For me I Think online gambling is more safe than real life gambling, especially if in your country gambling is illegal, because if you are gambling in real and you get caught by police, jail is waiting for you.
Are there countries where all forms of gambling are illegal? I would think that even in countries where gambling is highly regulated, they still have som casinos that are legal and licensed by the government.
But those casinos may be easily accessible for everyone because those casinos may be one or few and may be quite far from people location. So it makes no not economical to travel to those places to play in real casino instead can enjoy those from home online gambling.