What you have is what is known as "competing effects."
For instance: x-rays penetrate a human body easily because they are high enough frequency that most dielectric effects have relaxed out - meaning they can't respond faster enough to the incoming wave. So the only thing that really affects x-rays is nuclear mass. That's why bone (which is more dense and contains heavier nuclei) is a better x-ray absorber (or scatterer) than soft tissue.
However, as you get to things like visible light, these dielectric effects start kicking in, and now you have lots of absorption modes. BUT you get down to extreme long waves, like radio and farther, and suddenly most common objects become too small for the wave to "see." (Rule of thumb: radiation does not meaningfully interact with objects on a smaller scale than its wavelength) So now, you can have low frequency stuff penetrating miles into things that would have long absorbed x-rays. Also, you find when you study radio transmission that the atmosphere has "windows" where certain wavelengths are strongly absorbed and others are not. For instance, standard RF (from 10-40GHz, let's say) goes through the atmosphere quite nicely, thank you very much. You climb up in frequency to THz, and it gets just shut down by water vapor, and makes it mere inches into the air. Keep on climbing to the visible range, and we're all good again.
You see this concept a lot in physics where in one zone you have one dominant effect that drops out, but a new one picks up.