I once stood behind someone in line who bought scratch off tickets. She spent $10 on tickets and one of them was a $5 winning ticket. She considered herself to be a winner, even though she left the store with less money than she had when she came in.
I believe prizes are about half of the cost of lottery tickets and the state takes the other half. Some of this is spent on administration of the lottery, but part of the money goes into the state’s coffers. So buy those tickets and be happy when you “win.” Every time someone buys a ticket, it means my taxes are less likely to be raised. I always win at the lottery, although I’ve never bought a ticket.