I had high hopes for China's future back when I lived there but that is no longer the case with the current government.
To expand, Xi is a leader for life [1]. China is best modelled as a large, wealthy dictatorship which will act to keep its narrow leadership in power. This is very different from the long-term planning which characterised its growth when it was capable of peaceful transitions of power.
Pushing this legislation (or kidnapping bookstore owners publicising corruption amongst Beijing’s elite [2]), for China, is stupid. It stokes a vocal, organised opposition to Beijing. It also makes clean integration in ‘47 less likely. (The fraction of Hong Kong residents identifying as Chinese versus Hong Kongese has plummeted in the last few years [3].) From the perspective or keeping Xi in power, however, the ham-fistedness makes sense.
[1] https://www.bbc.com/news/world-asia-china-43361276
[2] https://en.m.wikipedia.org/wiki/Causeway_Bay_Books_disappear...
[3] https://www.reuters.com/article/us-hongkong-anniversary-idUS...
Also Hong Kong's status might just be a constant question that if Hong Kong is part of China but has some local autonomy....why can't other parts of China? Especially if there was an economic crisis and Hong Kong faired better...
Easing them in might be secondary to domestic concerns.
Maybe this analogy is a bit of a stretch, but imagine the pan-Blue as ethnic Cubans in Florida, who despite feeling more Cuban than "Floridian" would never peacefully agree to Miami being reunited with Cuba under Castro regime rule.
The only way China and Taiwan could be reunited peacefully is if the CCP falls, the mainland becomes a capitalist liberal democracy acceptable, the pan-Blue coalition somehow becomes politically dominant in Taiwan despite being in opposition now, and they negotiate an agreement with the new Chinese regime. This is maybe not totally impossible, but still far-fetched.
I expect the CCP understands all of this. Since peaceful reunification with Taiwan is already impossible without the CCP going under anyway, it's not a good reason not to interfere with Hong Kong.