I think it's not illegal and legal because there are no rules about it.
There are some countries that ban gambling through casinos and even in online site. I do not know why they banned gambling online and offline but we all know they have a good and explanatory reason. Gambling is worst addiction and it can literally destroy lives, if people in a country can't avoid or keep themselves in gambling, then it is better for the government to ban it.