The RNG continuously cycles through numbers even when the machine is not being played. These numbers correspond to the stops on the wheels that display the winning or losing symbols you see when the reels stop. When you hit the spin button or pull the handle, the RNG picks the combination at that given microsecond. If you had stayed at the machine, it is highly unlikely that you would have stopped the RNG at the exact nano second to display that combination of numbers. Casinos can loosen or tighten the slot machines with the flip of a switch.
Slot machines have a computer chip pre installed that determines the pay back percentage.
These are preset at the factory. In order for a casino to change the pay percentage, they would have to change the chip. However, in most jurisdictions there is paper work that has to be filled and submitted to the Casino Control Commission for each machine if the chip is changed. It is time consuming and the chips are very expensive. For this reason, it is more economical to decide on the pay back percentages before purchasing the machines and have the factory ship them that chip.