If you only have $20k and need $0.5M for an urgent life saving operation, then the expected payoff for not playing is -$20k (death) and it's -$20k+(some non-negative value representing the win) for spending all of your money on tickets.
We spend our money on plenty of things that offer negative monetary returns in exchange for pleasure, comfort, and entertainment. Premium beer, in my case.
Besides, it's not constructive to consider only the straight monetary expectations of lotteries when discussing their socioeconomic implications. Poor people are generally not buying tickets because they think it's the mathematically correct move.
Consider a lottery that sells tickets for $1 and pays back an average of 50c per ticket, with only one prize: the $500k jackpot. (This is pretty much the most favourable case for trying to raise the money by lottery.) Then each ticket has a 1/1000000 probability of winning, and (roughly) if you buy $20k of tickets then you have a 1/50 chance of winning.
Instead, you could go to a casino and bet all your money on one spin of the roulette wheel. Assuming that the game is fair but has single and double zeroes, your chance of winning is 1/38 (instead of 1/50) and if you win you get $720k (instead of $500k).
Or you could sink a lot of money into a troubled company whose stock price is very low and hope it recovers dramatically. I don't know how often such opportunities exist that have even a 1/50 chance of paying off 25x in a hurry, but I doubt it's that rare.
To answer your specific question, Srivastava called the provincial lottery agency (iirc - it was Canadian) and asked 1) Would they send him a large number of tickets to use for a promotion / fundraiser, and 2) Would they "buy back" at face value any unused tickets. They said they would gladly do both - meaning he could examine before scratching, return unscratched, and also avoid lining up at the drug store to buy 10,000 tic-tac-toe tickets at once!
Edit: Previous discussions
Srivastava - http://news.ycombinator.com/item?id=2166555 Cash WinFall - http://news.ycombinator.com/item?id=2828122
I give Srivastava credit for finding and exploiting the loophole, but they also seem to be easily closable. So the scratchoff is vulnerable. Future ones might be as well. A little common sense and better security could avoid another mishap.