Bonuses aren’t normally random – it’s the outcome of each spin that is random.
For example… on DHV, you click spin, the RNG returns a win of let’s say £25 on a 50p stake, and represents this visually in the form of a bonus. Can’t comment on exactly how DHV is programmed, but I’d imagine it picks a symbol and that shows up just the right amount of times to create enough wilds and therefore wins to give you that £25 outcome. It’s almost definitely predetermined.
If it span in a 1000x win, it’d probably display this as a low playing symbol (e.g. a 9) and then chuck out lots of them.
In essence, bonuses are just a visually entertaining way of handing us the win! There are of course some bonuses that are random in themselves, pretty sure I’ve read that each individual spin on BTG Megaways games each generate their own random outcome.