Part of it could be explained by how the lotteries are marketed. For example, in the south side of Chicago (not exactly known for its manicured lawns and gated communities) there was a billboard advertising the lottery: "Your ticket to easy street." As more anecdotal data, it has been my observation (without actually recording my finds in an organized manner) that one will see considerably more lottery advertisements in low-income neighborhoods than in more wealthy neighborhoods.
I'm not saying that advertising is the explanation, but I'd be surprised to find that it had no bearing at all. I also kind of wish that state governments would, well, cut it out.