I view buying a lottery ticket as a way to fund the things that the taxes are allocated to while also getting to fantasize until the drawing. I play maybe twice a year. There's near zero chance I'll win. That's not the point. The point is to have that fantasy, just for a moment.

> taxes are allocated to

That gets messy in a hurry. Most of the time time a lottery is introduced to help fund school districts, funding from other sources for those districts dries up. Money is fungible, and the effect is as if the lottery money directly went somewhere other than its earmarked purpose.