Recently I've been wondering why certain materials are transparent or opaque to different wavelengths of light. The most common explanation for why a material, like glass, is transparent (in the visible spectrum) is because the photons of those wavelengths don't have enough energy to excite electrons to a higher energy state, so the photons move through the material unaffected. Once you reach a critical frequency, however, the photons will begin to be absorbed because they have enough energy to excite the electrons (which is why glass is opaque in ultra-violet). By that logic, one would expect that ALL frequencies higher than the critical point would be opaque. That is not what happens, however, as x-rays/gamma-rays penetrate deeply into certain surfaces (like your skin).
Furthermore, x-rays/gamma-rays can ionize atoms by providing an electron with enough energy to escape the atom (which I believe is the cause of the photoelectric effect). Finally, an escaped electron can release some of its remaining energy through Compton Scattering, producing a lower frequency wave than that of the incident one.
Compton Scattering seems to offer a candidate solution; i.e. that it's the scattered, lower frequency waves that make it through. However, according to this article, and more specifically this graphic (shown below), Compton Scattering starts occurring at a certain energy threshold, so it doesn't explain the relatively high penetration depth of lower frequencies. Furthermore, the graph also demonstrates that the penetration depth is proportional to the photon's energy, which again contradicts the trend discussed in the first paragraph, where one would expect the penetration depth to decrease as the photon's energy increases.
I have looked for an answer on several sites, but none have provided me with a fully satisfying answer. These sites tend to either simplify the material, or simply gloss over this particular aspect of the more general question: "Why are materials transparent?". So, to summarize, my question is:
Why does the penetration depth of high frequency waves increase for higher energies, and why is this not (apparently) applicable to lower frequencies? Given a high enough frequency, but still lower than the Compton Scattering frequency, why aren't all surface atoms ionized, effectively making the material opaque? (i.e. photoelectric absorption)