Why is such strange characteristic of the atmosphere?

The issue is not that O₂ and N₂ do not absorb radiation, but that they do so in the far-infrared and ultraviolet wavelengths rather than the visible/near-IR band discussed here, and not very intensely. The exact absorption spectra depend on temperature and pressure as well as the exact mix of gases, etc., but you can get an idea by looking up parameters in a database, e.g., HITRANonline line-by-line search: 1. Select Molecules

On the other hand, H₂O will totally absorb a lot of near-infrared wavelengths as you can see from your picture, while visible radiation is not very much absorbed by atmospheric gases.

See also
http://irina.eas.gatech.edu/EAS8803_Fall2009/Lec6.pdf
and previous threads on the topic