I'm not sure why you are bring down voted. Your point is valid, people buy tickets for reasons other than "I expect to win".
We buy raffle tickets, not because we expect to win, but because we support the cause.
Gambling can be entertainment. If I spend all night in a casino, end up $50 down, but had a fun night, how is that different to a ballgame, or show, or whatever. [1]
In the same way people buy lottery tickets not because they _expect_ to win, but because its entertaining to _think about winning_, and the ticket is the price of admission. [2]
[1] clearly there's a difference between losing entertainment money, and rent money. And gambling is not a good hobby for most people.
[2] actually _winning_ the lottery has massive relationship downsides, which one can clearly ignore while daydreaming. Losing all your friends, an almost inevitable consequence, seems like a bad thing...