Some people enjoy gambling. If it pays off, yay! If it doesn't, it was only a couple of bucks that they felt they could spare.
I'm aware there are very poor people who play the lottery in hopes of it fixing their lives, even homeless people. And I don't think that's a great idea. But there are people who can spare a few bucks who just like playing.
One person I know used to call it "Contributing to my nephew's scholarship fund" because the lottery covers education expenses in that state.
I have only rarely played the lottery. It's not really my thing. But not everything in life needs to be decided with a slide rule for someone to be fundamentally healthy. In fact, I have seen studies that suggest that people who do a little gambling are typically healthier than average.
It's not supposed to be an investment, it's something you do for the fun of the "what if".
There. Just saved you n dollars where n is the number of times you want to play that game.
Humans also want a tiny possibility of it happening to make their "what if" worth, and are willing to pay to get that.
Just like they are more engaged when there are props and sets and costumes when they see a play. A play requires suspension of disbelief, so they could have also made believe that they see the set and costumes over a naked stage, but we don't want that, we prefer to have them as aids.
That only makes it more likely that this person is losing money by playing. "Crazy" is too strong, I agree, but it's certainly not the shrewdest investment.