When you buy a lottery ticket, you’re not just betting on the next big win—you’re paying for the entertainment value and maybe even a little bit of hope that you’ll become wealthy in an instant. While the odds of winning are slim, lottery games are a popular way to spend money and are incredibly profitable for the people who operate them.

A quick look at state lottery data shows that players are disproportionately low-income, less educated and nonwhite. One in eight Americans plays the lottery at least once a year, and those tickets generate between 60 to 80 percent of revenue for the states that offer them.

The lottery has become more and more lucrative for the companies that operate it by increasing prize amounts and boosting sales with super-sized jackpots. These jackpots draw more attention to the game, and they entice people to play by offering them a chance to be rich in a flash.

Lottery winners are often advised to hire a team of professionals, including an attorney, accountant and financial planner, to help them navigate the pitfalls of sudden wealth. Among other things, they can help them weigh the benefits of annuity payments against cash options.

But the lottery system doesn’t run on auto-pilot; there are people working behind the scenes to design scratch-off games, record live drawing events and keep websites up to date. A portion of lottery revenues is set aside to pay for those employees and the overhead costs associated with running the lottery.