I was quoted in this article about the history of legalised gambling:
“Legalized gambling was the default, and was very mainstream in many societies,” explained Michael Josem (@MichaelJosem), a global expert in online gambling security and safety. “It has never been illegal in Western societies to gamble privately (eg, ‘I bet you $10 that I can beat you to the end of the street’) but there have been some limitations around some forms of offering gambling as a business.”
As Josem said, humans have likely been making informal bets with each other since shortly after they were able to communicate. Some of the earliest dice have been found in Egyptian tombs that are thousands of years old.