Why does N₂ react with O₂ to Form NO at high temperatures?

This also raises questions that I have about the Haber Process which produces ammonia ($\ce{NH3}$) from molecular nitrogen ($\ce{N2}$) and hydrogen ($\ce{H2}$).

I have heard multiple times that bond between diatomic nitrogen is one of the strongest bonds in nature due to the fact that it is a triple covalent bond that fills the valence shells of both atoms.

I understand that at high temperatures it is possible to break this bond, but I don't understand why the resulting Nitrogen atoms wouldn't simply return to their previous bonds as the temperature cooled.

For example, I read that lightning can result in this reaction: $\ce{N2 + O2 -> 2NO}$

Why would the atoms not return to their original bonds since they would be more stable in that manner? Is bonding indiscriminate at high energy levels? Completely random and dependent on luck?

$\Delta G = \Delta H - T \Delta S$
In the case of the $\ce{N2 + O2 -> 2NO}$ , $\Delta H$ and $\Delta S$ are both positive, so the reaction is thermodynamically favorable at high temperature (such as in lightning) but not at low temperature.
However, that NO is unstable at room temperature tells us nothing about the rate of the decomposition reaction. In fact there was an interesting 40 year study showing very little decomposition of NO sealed in glass tubes over that time period. The authors' calculations show that without a catalyst the timescale of decompsition could be $10^{29}$ years!
The Haber process usually uses metal catalysts to help the bonds break. It runs at extremely high temperatures and pressures, enough to cause worry that it will burst steel vessels. At these conditions breaking $\ce{N2}$ and $\ce{H2}$ can and does happen. It's true that the nitrogen-nitrogen bond is broken, but once that happens ammonia forms quickly.