It's not a scam. Think of it as a "stupid tax" for folks that can't fathom infinitesimal probabilities.
This.
The UK lottery used to cost £1 per go (I think it's gone up now - I don't play it), but anyway for getting three numbers correct that would win you £10.
However, the actual probability of getting three numbers correct out of a six-number choice with numbers ranging between 1 and 49, the odds are approximately 57-1.
Which means that the organisers of the lottery were only prepared to pay out 10-1 on real odds of 57-1. In other words, you could have played the lottery into infinity and never turned a profit.