From Reason:

First, the majority of lottery revenue goes back to the government. In 2015, The Atlantic estimated that 40 percent of all lottery ticket sales are allocated to state governments. As Steven Greenhut, western region director for the R Street Institute, explained in a 2016 piece for Reason, this “voluntary tax” to support education is supposed to be a positive. But politicians often use lottery revenues to supplant school budgets. As Greenhut put it: “Money is fungible, so the education element mainly is a public-relations ploy to help people feel good about the dollars they spend on tickets.”