Buying lottery tickets can be rational, and it can be a means to the end of investing your money for the right reasons rather than the wrong reasons. But it’s still a great way of losing money, and most people shouldn’t do it.
Which, weirdly, makes lottery tickets great gifts. The ideal gift is something the recipient wants, and values, but would never buy themselves. Which is why when they’re given lottery tickets, people feel so good they’ll even donate blood. Powerful things, lottery tickets.