Actually the legal advice from Government ( Which in the past 10-15 years has always been Pro-China ) on the issue was that the Pro-Democrats were right as it was listed very clearly by the rules. That there was no way "reinterpret" it. It was a surprise to the Pro-China party so they sort to external legal advice and suggest or basically completely changed the rule.
Is was at that moment, Hong Kong is officially Rule by Law and not Rule of Law.
And yes that is why the later part was an absolute mess. People were planning to protest about it anyway, but before anything was planned the new security law happened.
It’s looking like a couple of rough months ahead, the new security law will take into effect, most likely the national anthem law will go through as well.
At best the elections in September give a majority to the pan-dems.
In fact, while listening to the press conference of the pro-china party right now on National security law, they just said it: "compared to safety of the 1.4 billion Chinese citizens, stock market drop is insignificant". To me it sounds like that China has dropped the axes, HKers better be quiet.
The last part is difficult, both sides sought legal advice, both were contradicting each other. Eventually the pro-China side pushed through with their advice, which resulted in clashes and eventually the eviction of pan-democracts.
All in all; it’s an absolute mess, and not expected to get any better. China is already circumventing the HK government by pushing for a national security law. (Which was supposed to be implemented over the past 23 years)