The judge in the case ruled that the lottery was not a tax because a tax is "a forced contribution to government which has no necessary immediate relationship to a benefit conferred." And nobody holds a gun to anyone's head to play the lottery, so it must not be a tax.
Of course, by this measure there are plenty of "taxes" in North Carolina that really aren't. As the Greensboro News & Record puts it:
The state doesn't force anyone to purchase gasoline, cigarettes or beer, yet it imposes a gas tax, cigarette tax and beer tax.It's an interesting point: lawmakers aren't choosing the lottery to fund schools because they think it's a great idea, they're doing it because it's easier than raising taxes. The North Carolina lawsuit asks the important question: why should this be easier than raising taxes?