The accumulation of nitrious oxide in games has no real life counterpart. In real cars a limited number of capsules filled with NO2 have to be filled at the start of the race. In that way it is similar to fuel which you can't 'earn' during a race (except for a pitstop ofcourse).
The reason this mechanic in games exist is to encourage risk-reward gameplay. It appeared in games as the Burnout series where driving in oncoming traffic, drifting etc. earned 'boost'.
In the Need for Speed Undergound series boost was translated to NO2 (probably since it was featured in movies such as "The Fast and the Furious" so the general public were familiar with it).
It has since become a staple way of introducing the risk-reward challenge in arcade racers as it works really well (as a gameplay device).
Boost mechanics in games have no basis in real life.
You give out boost to:
Help players further in the back to catch up faster, by giving them more boost.
Encourage aggressive play (ramming, jumping), which to some people makes the game more fun.
Boost mechanics are for action racers, where all cars should constantly be on top of each other (sometimes literally), always pushing and shoving and occasionally wasting each other.
The racing games which see themselves as more serious, where any form of contact can permanently damage your car and destroy any chance of winning a race, almost never use boost mechanics.
As others said, you can't just teleport additional "doses" of nitrous into a car that's earned it. But if you're looking for a realistic explanation, say you have enough "charges" in the car for the maximum number of times they can be awarded in every car at the beginning of the race, and the additional charges are simply locked until the car reaches a certain air time duration or something.