I used to work for Victor Chandler  and there's basically a small number of companies who supply the games to all the different gaming sites. NetEnt  and Playtech  are the two which I can remember.
There are hundreds of games available, but they are all basically the same with different skins. The spike in traffic when a new game comes out always surprised me, people wanted to play the new SpiderMan game (or whatever) even though it's exactly the same as all the others, just with a different colour-scheme!
At the point where you start the game, the outcome is already determined, it's just a case of going through the motions until it informs the player. Whether that's scratching numbers off, watching a virtual horse-race etc...
It's heavily regulated though, much like fruit-machines/one-arm-bandits there is a percentage payout which needs to be satisfied, so it's no more a scam in that sense than buying physical scratch cards which they have to ensure a certain percent win each of the prize levels.