Lotto also has societal benefits, like funding schools and keeping organized crime out of the casual gambling market. Plus it's fun, on the order of, say, eating a mini bag of Doritos while you're stuck for three hours in a train station (but without the calories).
So why does the "I know math" crowd deplore the lottery but not voting? I'm guessing the real answer is that one is looked at as a low-class activity and one a high-class activity.
Edit: Just to be clear, my point isn't that voting is bad, it's that lotto isn't a pure math problem.