Isn't this how gambling works though? You and I place a similar value of chips on a table, then the winner walks it over to a third party (the counter at the casino) to exchange the chips for currency?
It's a relatively uncommon structure for gambling, and things that do work that way (like casual sports bets between friends) are often exempt from local gambling laws. Traditional sports betting was done directly between a gambler and their sportsbook of choice at whatever profit-maximizing odds the bookie chose.
In gambling, you are betting against the sportsbook run by the house, not peers.