State lotteries and their technology suppliers sell draw games and scratch cards, funding public budgets.