Why do higher frequency waves have better penetration?
It is not true that higher frequencies always penetrate further than lower ones.  The graph of transparency of various materials as a function of wavelength can be quite lumpy.  Think of colored filters, and those only apply to a narrow octave of wavelengths we call visible light.

What you are apparently thinking of is wavelengths so short that the energy is very high, like xrays and gamma rays.  These go thru things solely because of their high energy.  At lower energies (longer wavelengths), the waves interact with the material in various ways so that they can get absorbed, refracted, reflected, and re-emitted.  These effect vary in non-monotonic ways as a function of wavelength, the depth of the material, it's resistivity, density, and other properties.