Lottery to me is different from gambling. In gambling there's a wager. You make a pledge of something and then with a hope to winning which if you don't win whatever it was you pledged is gone. This is where people label gambling bad because some bet valuables and win or lose until they're addicted to doing it and then frustration sets in and that's why a lot of times people are told to stay out of gambling but lottery is not gambling and it doesn't include the wager. Many people do not consider lottery as gambling so they participate in it because one cannot get addicted to participating in the lottery.
Gambling is a general term and there are different games under it including lottery. When you play the lottery you are playing a gambling and you are wagering but it's funny if you will make a pledge as there is still no assurance to win in gambling. It's the gamblers' fault on why they lose their money because they are the ones who play gambling and the casino didn't forced them. What is worse is they can say negative things to it after.
The right way to play gambling is to not take it seriously. That way, you will never risk your valuables, become addicted, or be frustrated to it but you will only feel happy because you have been entertained.