All machines are slightly different but they all work on the concept of determinism. Now as far as I understand the bonuses are a separate calculation with the normal spins. So say you calculate 2.000.000 spins, where 20.000 are bonus spins. (I would think these numbers are a lot bigger, like 10^15 atleast) All the spins are have a combined cost of say 100%. Now the payout have a combined value of the theorize RTP is, like if its 97% then the payout is 97% of the combined cost for all the spins.
So you can have the most boring game in the world be put in 1 pound, get out 97p for all spins. But since nobody would play that, you have 50% of spins that give nothing and can now redistribute those 50% to the rest. This effect is what makes the machines feel differently. How much the different spins and bonuses pay is about this redistribution.
Now this also works on the bonuses. In order for some bonuses to pay more, you have to have some that pay very little. If you have a thing such as a bonus guarantee like Rhinos, then you have to take a bigger share of the normal spins to pay for that.
A machine such as the high volatility Dead or Alive 2 has like 95% very bad bonuses and 4% somewhat good, and 1% very good.
In essence its all redistribution.
Now a very very very important part of this is that each spin is INDIVIDUELLY evaluated. A spin you get is NOT removed from the possibilities. Very unlikely, but you could get the same spin twice in a row. Each spin is as true random as can be between all possible spins, each spin. This also means that your previous spin(s) have absolutely NO impact on your next spin (With exceptions in progressive jackpots, and have the value of the jackpot increased).
This means that a machine might pay out a lot more or a lot less than the RTP, but over time (going to infinity, but a lot faster) the payout for all games combined averages out to the RTP designed.
A bonus buy therefore is just a cherry pick roll in only those 50.000 spins that are bonuses. Some will be utter turd, some will be great. Buy them on a machine such as Dead or Alive 2 and have a high risk of it being turd but a small chance of it being insane. On a machine such as Big Bass Bonanza, and you will often get a decent bonus that doesn’t fluctuate too much.
Since no spin is removed when rolling, buying a bonus also doesn’t “remove” that bonus from the normal game. Unlike scratch offs, hitting a spin does not remove it from possible spins!
TL;DR; Slots are like spinning a 10^15 sided die and bonuses is just 10^5 of those spins, that can be rolled individually when buying a bonus. Same pool as if it hit naturally on the original die.