That is true only if making lotteries illegal made them nonexistent. In the United States, the legal lottery is arguably better than the widespread (illegal) "numbers game" it replaced.
It's rational to play the lottery if you believe that it's the only way to make a significant economic change to your life.
That's a bigger problem than just education provision.
Last year the HN consensus was that daily fantasy sports betting was some sort of civil liberty.