Question: why is the atmosphere mostly nitrogen?
Answer: Nitrogen is not stable as a part of a crystal lattice, so it is not incorporated into the solid Earth. This is one reason why nitrogen is so enriched in the atmosphere relative to oxygen. ... Thus, over geological time, it has built up in the atmosphere to a much greater extent than oxygen.