Lottery is a fixture in American society, with people spending upwards of $100 billion on tickets. And while there is a simple explanation to why some people play—it’s fun, it’s a game, it feels like you’re doing something civically responsible—that doesn’t change the fact that it’s an addictive form of gambling.

The big reason lottery draws people in is the promise of instant riches. But achieving true wealth is hard and, even when you do win, the money may not be as life-changing as advertised—instead, it often brings with it a decline in quality of life for those who are fortunate enough to hit the jackpot.

To understand why so many people are willing to spend their hard-earned money on a hope for a windfall, we need to go back to the beginnings of this practice.

In colonial America, public lotteries were used as a way to raise funds for everything from roads and canals to libraries and churches. They were also instrumental in financing the construction of several American colleges including Harvard, Yale, and King’s College.

Lotteries are not only a form of gambling but they’re also a hidden tax on the poor and middle class. This is because the monetary disutility of losing a ticket outweighs the non-monetary utility of winning. But despite these flaws, the lottery is an immensely popular and profitable enterprise for the states that run them.