It was basically allowed as a regular game to play, but illegal to turn into gambling one. Same with any card to be fair, like I can play poker with my friends at my house and nothing is wrong with that, we can even play for money as well and nobody would care about that, but when we start to consider turning into a casino that helps people play? Suddenly that becomes one of the biggest issues ever and it becomes something we can't do, it's illegal and government will put a stop to it.
Same logic here, sure you could play with your friends or yourself whatever, there is nothing wrong with that one, but as soon as you become the casino and play for money and make people play, that suddenly becomes an illegal thing to do.
Just be cautious about this even it doesn’t involved money. Some shady cops usually plant evidence once they saw you playing this kind of game that usually used on gambling. This is popular in my country especially on slum area which the residents is typically accused on this kind of activities.
Here, The only time this game allowed to be played publicly outside the casino is during a funeral which this game gave a source of money given to the deceased family. Playing it casually IRL is a bad idea if your country has shady cops.