Why didn't the British introduce democracy to Hong Kong when they had the chance? 99 years is a long time to not even bother trying.
And why wouldn't they allow Hong Kong citizens to apply for British passports?
Why no democracy in colonial times? It varies across time, with a constant theme. Up until about 1950, it's basically racism. British people were good at governing, Chinese people were bad at it (look at all those warlords!). Between about 1950 and 1980, it's because they didn't want to restart the Chinese Civil War. Most Chinese groups in the colony, from dance clubs to trade unions to newspapers, were affiliated with either the Communists or the KMT. Democracy would either have meant a cryptyo-Communist government inviting in the PLA or a crypto-KMT government overthrown by a PLA invasion. HK was a Western base in the Cold War and a trading post, neither scenario was welcome to elites in London or Victoria. Between about 1980 and 1992, it's because the Communists didn't want it. All the other inhabited British territories had democracy by this point, but it was clear HK survived on Beijing's permission and Beijing wanted to change the faces without changing the system that so clearly worked well. Then, in 1992, Chris Patten was appointed Governor - one of only two HK decisions since 1949 where domestic British politics played a role. Patten was a democrat and introduced democracy for the last few years of British rule, to Beijing's utter fury.
A constant theme through these periods (and through European imperialism in general) is that policy tended to be set by British people on the ground, not long-term calculations in London. In Hong Kong's case, this meant (a) civil servants who preferred to run things smoothly themselves rather than risk having elected politicians to upset things (and increasingly co-opted Chinese into their ranks) and (b) businesspeople who wanted a global trading post with minimal politics, and got it.
Passports was the other issue where British politics played a role. It should be noted that the normal pattern in decolonisation is that the natives, i.e. 'black' or 'yellow' people (Irish etc. are black for this purpose!) were transferred to nationality of the new state regardless of their opinions, while 'whites' had no opportunity to acquire it. People who didn't fit into that neat paradigm had their lives ruined. So British passports for everyone would have been extraordinary and would have made Beijing even angrier. However, there was strong pressure in London to give people an alternative to Communist dictatorship, especially after June 4th. As a result, selected members of the elite were given full British passports (in the hope that they would stay in HK knowing they could leave at any time, which proved to be correct) while anyone with enough cash could apply for a British National (Overseas) passport that did not give an automatic right to live in the UK. 3 million people, just over half of those eligible, took up the offer.
Im not sure why China is causing itself this much trouble, Hong Kong being its own system has done nothing to destabilize their power over the years so I dont quite get why they think this is worth the headache. This sort of behavior will just create destabilization and bigger picture certainly degrades any chance of a peaceful official reunion with Taiwan. If they had just let Hong Kong be an example of "one china two systems" in action and working the door might have been more open.
The new Chinese leadership of President Xi is nationalistic, determined to re-assert the authority of the Party, and afraid of going the same way as the CPSU or the regimes overthrown by Colour Revolutions. They will not tolerate an inch of dissent, as the appalling case of Ilham 'Tohti' shows. And, very foolishly, they have raised the stakes by giving a particular plan their blessing rather than giving themselves the option of ditching CY Leung and compromising later. They have backed themselves into a corner and that just makes them more dangerous.