The difference between a betting company the stock market is that in the stock market you have regulation to separate the exchange from the market maker. So in the stock market you go to the exchange, you buy or sell at the market price (or place an offer in the book) the exchange takes a commission but you're trading with a 3rd party. In the gambling world that generally doesn't happen, the exchange and the market maker generally are the same person - and there's good reason for that, if you can do it it's a better business model.
But either way, the same effect occurs. The sharks in the stock market profit from making good trades and in order to account for that the market makers have to quote a wider spread in the book, which effectively means the retail trader pays a larger spread. The net effect is money transfer from the retail trader to the smart trader. Would it be better for the market maker to just refuse to trade with the smart trader and then give the retail investor a better spread? Welcome to payment for order flow. Could a smart investor pretend to be a retail trader and get some good trades through Robinhood? Maybe, that's pretty analagous to what these guys are doing.
These are different mechanisms for the same thing but I'm not certain one is clearly morally superior.