Some country decides to make lottery illegal, but the other country is not illegal.
Well for some countries that has a solid foundation from religion like in the middle east which is dominantly comprises of Islamic countries that sees any kind of gambling as a sin it is illegal. Some are illegal due to different state legislation under federal provisions, for example lottery is prohibited in Washington but not on New Jersey.
I have seen some lottery games in here. The lottery has so many prizes, and the price to buy the tickets is not expensive so people can buy as many tickets as they want. The lottery has a number from zero until 10000 (for example), and if someone's number shows up in the winner's list, then he can bring the prize to his home. I think the lottery can be an attractive game and it can attract many people to buy the tickets.
Lotteries are commonly running under the government, this is another way of them to get a support for their platforms and programs for the public. Although the odds of winning is nearly impossible, just think of betting on it is contributing for a good cause and winning is just a bonus. I play lottery every time the jackpot prize is above the usual pool, hoping for my fortune to match it.