I think this ref explains it well:
Why Nitrogen is Better Than Air - No Water Vapor
It’s all about what’s missing.
The biggest advantages cited about nitrogen-filled tires have to do with how nitrogen-filled tires maintain a much more consistent pressure, even as the tire heats up, than air-filled tires.
As a BMW representative explained to me:
The main advantage of using Nitrogen in tires is less pressure growth as the tire heats up.
And the reason that nitrogen suffers from less pressure growth is primarily due to one thing:
Moisture in the air in tire cause more pressure rise as the tires heat up. What is worse is that the pressure increase is somewhat unpredictable since depends on the humidity of the air added to the tires.
Water. Humidity. Clamminess. The real hero here isn’t nitrogen, it’s the lack of water vapor. About 1 percent of regular air is water vapor at sea level, and when that air is compressed to go into your tire, that concentration can increase as well.
Water vapor is much more susceptible to changes in pressure from thermal changes. It expands when hot, contracts when cold, and changes the tire’s PSI as it does, which can cause problems for precision track and racing cars with handling tuned to very specific tire pressures.
Tire temperatures will increase while driving, due to friction and rubber deformation, and these temperature increases are independent of ambient air temperature. Tires can increase in temperature by around 50° over 30 minutes of highway driving (and much more for racing tires), and if you look at a chart of the vapor pressure of water at varying temperatures, you can see that a temperature increase like that can cause dramatically higher pressures.
Let’s say a tire starts at 60°F and goes up to, say 90°F; in that case, the water vapor pressure more than doubles. That’s a big deal.
Also, water can freeze, which is why nitrogen is specified for aircraft (and at least a couple spacecraft, like the Space Shuttle orbiter and that Air Force X-37B mini-shuttle).
So, really, the advantage of nitrogen is that it’s very dry, unlike air from a compressor, which may have a good bit of water vapor in it. It’s possible to dry out regular air as well, but it’s not terribly efficient and no easier or cheaper than extracting nitrogen, which, because of the processes used to isolate it, will always be free of water vapor.
Aside from keeping a more consistent pressure, there’s other advantages to removing water vapor from your tire: the water vapor can cause rust and corrosion inside your valve stem or to your wheel itself, so why deal with that [censored]? There’s also the idea that oxygen is more reactive with the rubber of the tire, and replacing that with a more inert gas like nitrogen will help the tire life as well.
HTH