Air is 78 percent nitrogen, just under 21 percent oxygen, and the rest is water vapour, CO2 and small concentrations of noble gases such as neon and argon. We can ignore the other gases.
There are several compelling reasons to use pure nitrogen in tyres.
First is that nitrogen is less likely to migrate through tyre rubber than is oxygen, which means that your tyre pressures will remain more stable over the long term. Racers figured out pretty quickly that tyres filled with nitrogen rather than air also exhibit less pressure change with temperature swings. That means more consistent inflation pressures during a race as the tires heat up.
Passenger cars can also benefit from the more stable pressures. But there's more: Humidity (water) is a bad thing to have inside a tyre. Water, present as a vapour or even as a liquid in a tyre, causes more of a pressure change with temperature swings than dry air does. It also promotes corrosion of the steel or aluminium rim.