The demographic that buys lottery tickets is largely die-hard anti-tax red that would never vote to fund education from raised taxes on anyone's income... a bit ironic when you think about it.
it isn't about gambling demographic, it is about voting demographic. To make the "salt of the earth holier than thou value" voters to vote for gambling you need to throw them a good cause they would thus supposedly support by their votes.