They had no choice. Not due to military might (Gibraltar would be just as defenceless against Spanish invasion, and yet it doesn't happen). But simply because holding on to colonies became morally unsustainable.
And the idea at the time was certainly that China would change in the five decades until unification. This was shortly after the end of the cold war, after all, which demonstrated that such change is possible, if not inevitable.
Thinking may have changed on that point. But I wouldn't fully exclude the possibility that China 2047 is more democratic than it is today. Things remain the same, until suddenly they don't.
And the idea at the time was certainly that China would change in the five decades until unification. This was shortly after the end of the cold war, after all, which demonstrated that such change is possible, if not inevitable.
Thinking may have changed on that point. But I wouldn't fully exclude the possibility that China 2047 is more democratic than it is today. Things remain the same, until suddenly they don't.