Gambling can be played in a variety of ways. You see, would it class as work if you are not paid in money? Does it class as a purchase if you decide to pay exchanging something? My take is that it is as long as you put there something that has value, from your own time, reputation and even intangibles... or works of art or anything. Time is money as they say.
Can you give proof that time is money? Time is valuable but I don't think it is money. You can spend time yes but you cannot acquire money from it unless you have used it to produce goods. Time alone cannot bring you money unless some factors are added. for example, your effort in doing jobs can give you money. Or you deposit or you invested money in some system that produce interest over the span of time. See effort and other factor is added on time to make money. Time alone cannot produce you money. example, if you idle yourself without doing anything.
Work isn't gambling because there is an agreement between two parties where the one provide effort and the other one provide payment according to the value of the work. There is actually no risk here because both party promised or made contract wherein if deliver will give the promised equivalent amount of the effort done. If the other party failed to deliver then he can be bring to the court to settle the promised payment.
Same goes with the purchased of goods. It can never be considered gambling because you just pay an amount equivalent to the item value. The one thing that can be considered gambling is the mystery purchase but it is on borderline gambling.
As long as there's a risk involved and it is some kind of prediction, win or lose type of games, then I would always consider it as a form of gambling.
Sometimes even if it's not directly money as long as it have a value and it is being risk then yes it is gambling.
What do you consider the risk to be about if there is no money at stake? Every single game is a win-or-lose type of game, but not every game in the world is a gambling game or should be considered one unless there is something staked on it and I don't see OP mentioning anywhere that there is some requirement for it.
If there is nothing of value at stake, it cannot be considered gambling at all, and risk is only when you have something at stake which you can potentially lose if you don't make a correct prediction.
That is why I stated that there are lots of people who are confused between gambling and playing a game of chance. Gambling is just a scope of the game of chance where people offer stake to take risk to the chance of getting bigger reward while other scope of the game of chance can be played even without stake.
For example, a guessing game can be a gambling and at the same time just a game of chance.
Guessing game can be a gambling if the player offer a stake or bet to win something.
Guessing game is only a game of chance if the player does not offer stake although get rewarde when he guess it right. And the case cited by @OP fall under this category.