They didn't create value, they figured out a way to purloin value out of the casinos. Every dollar they gained was a casino's loss.
Much of programming is indeed like that, especially in the finance industry, where your gain is usually someone else's loss. There does exist true value-creating programming though. Games are an easy one; presumably the reason a customer pays $10 or whatever for your game is that the customer perceives more than $10 in entertainment value.