Slot machines are programmed with a table of payouts based on a rate, typically between 80 and 99%, such that the statistical expected payout overtime will be compounded at that rate. In some jurisdictions (e.g. Vegas), it is legal for the casinos to program a machine at greater than 100%. They do this to attract the players, who will attempt to find the winning machine on the floor. Random numbers still work, so not every payout wins, but over the course of the day you can get a payout. So you may have just walked away from free cash.
Source: I used to work in casino gaming (I wrote the Megapot server used for multi-casino progressives in France)
Re: Megapot server. I've always wondered if those incrementing jackpot banners are actually tied to a real server of if it just increments based on an average. Are those incrementing numbers actually coming from a server in realtime?
In the case of most progressives, there is just a single bank of machines, and they are communicating in realtime (wire delay) between them. When I quit the industry, the Megapot was the first server distributing money across sites in realtime (network delay). There was a similar product offered by IGT at the time, but the incrementing counters were entirely based on play within the casino; casino jackpot sums were batched and shared across the casinos according to a fixed schedule. Our displays were certainly based on real money, and I suspect anyone else in the industry would have to do the same to be legally in the clear.
Source: I used to work in casino gaming (I wrote the Megapot server used for multi-casino progressives in France)