Lottery games have long been an essential part of the American experience, but in recent years, they’ve become increasingly controversial. Some critics argue that they promote gambling addiction, while others question their legitimacy as a source of revenue for state governments. But the most fundamental issue is that they’re based on an illusion of instant wealth, and entice people to spend money they probably don’t have.

The first lotteries took place in the Low Countries, where a number of towns held lotteries to raise funds for town fortifications and help the poor. The prize could be a fixed amount of cash or goods, but more often it was a percentage of total ticket sales. One of the most famous examples is the Dutch Staatsloterij, established in 1726.

Aside from the innate human drive to gamble, there are a few things that make lotteries popular. For one, they tend to attract the attention of news media and generate a huge amount of free publicity. Super-sized jackpots, especially those that exceed $500 million, also boost interest in the games.

Lastly, many of us are convinced that winning the lottery is a great way to get rich, and it certainly can be—but only if you follow the rules. The rest is mostly personal finance 101: Pay off your debts, save for retirement and college, diversify your investments and keep a robust emergency fund. Regardless of what you do, don’t listen to the pundits who say you should buy more tickets to improve your odds.