The value is in the hope it creates. As a statistician, a lottery seem hopeless. To everyone else, it's about feeling that something impossible becomes possible.
Tbh lottery tickets can be a pretty cheap form of hope relative to other forms of gambling. Take a look at some of RobinHood's customers who are ”investing”. The odds seemed so favorable until they realized 95% of traders lose their money.