The lottery is a tax on people who are bad at math.
Anyway, the real motivations of the lottery customer are not as stupid as people think. Consider:
1. Odds of Joe Beercan getting rich through the usual methods (years of hard work, inheritance, rock stardom): Zero. And Joe knows this better than anyone.
2. Odds of Joe Beercan getting rich through the lottery: One in 600 billion. He knows this is a longshot, but that it's better than nothing.
If you want even the merest shot at getting rich, the lottery's not so bad. (Though hoping for 10 blackjacks in a row is probably still better.)