The government cannot completely ban gambling, no matter what efforts they make, people will still gamble, so it is more realistic to strictly regulate and supervise gambling practices, not simply ban them, and that is what the Hong Kong government did, they are probably tired of fighting illegal gambling and only losing more potential state revenue from it, so rather than continuously fighting illegal practices that are difficult to control, the Hong Kong government is smart enough to legalize it.