In a country where gambling is prohibited, if a person of law can visit someone who is addicted to gambling, then he is given legal punishment. I think does not fix this act
I also don't support such behavior of government where gamblers will be punished if they get catched by law. But each county has different point of views depends on their economy, religious prospective, their culture and others which make them to develop law for welfare of their people. There are many gambler who try to change their luck by gambling, after losing they involving criminal activities for manage money for gambling. Maybe thats the reason why some governments develop this law for gambling as publishable offence. So better to keep it secret for them who belongs to those countries where law don't allow gambling legally
Whether prohibitions make sense for certain things that lead to addiction is a widely discussed topic. Different countries have different approaches and this reminds me of the Netherlands legalizing weed, but in reality massive drug trafficking still happens in the Netherlands. The problem is that it is hard to surveil because obviously drug trafficking is done in sophisticated, hidden ways. Driving under a certain age is much easier to control because the police could catch you anytime or someone could backstab somebody else.
Gambling can be controlled in physical casinos, but if those are prohibited the whole market will shift to online gambling regardless of any laws. It happens online anyway for most people I guess. If it is prohibited in a country, VPN services pop up, instructions on the Internet are shared on how to do it anonymously.