My teacher gave the explanation stating that consider that first the nitrogen in lower state is oxidised to $\ce{N2}$ and then the further oxidation would stop as the $\ce{N-N}$ bond energy of $\ce{N2}$ is very high and can't be overcome under normal conditions.
But my doubt is can't the nascent nitrogen (formed during the formation of $\ce{N2})$ react further with $\ce{O2}$ and get oxidised to some higher oxides like $\ce{NO2}$ or $\ce{N2O}?$
The Latimer diagram shows that it is possible for oxygen to oxidise the nitrogen to higher states:
