In my view Hong Kong being a territory of China should be prepared for such laws and so should be it's residents. If people who have passports of other country, they have a choice if they don't agree with this change. This change was kept on back burner for a while until majority of the Chinese could reap the benefits of economic progress. In this case China's legislature has a backing of majority of the Chinese population, so the change will go through. China like Singapore is a meritocracy, not democracy, still for any policy change to be enacted it needs a tacit approval from majority Chinese.
So like in any democracy laws can be passed with majority, its the same for China.
Chinese legislature learned from the mistakes of USSR with perestroika and glasnost that until welfare and progress do not reach its population, it cannot have legitimacy. So they succeeded in it and USA cannot find a clear opening like USSR to break China. So they started firing guns on the shoulders of Hong Kong, Taiwan, India, Japan and other countries surrounding China, because the initial attempt did not succeed. In this game these countries will suffer immensely and USA will progress by selling them weapons and prop it's own economy.
Hopefully instead of questioning other country if every country look inward and secure to all its own people
JUSTICE, social, economic and political; LIBERTY of thought, expression, belief, faith and worship; EQUALITY of status and of opportunity; and to promote among them all FRATERNITY
assuring the dignity of the individual, the world will be a better place.