At any rate, China did not take it by force, and the U.K. did it voluntarily. If they hadn't decided to transfer back, would China have tried to take it back by force. It seemed as thought the majority of the population was not in favor of the return.
Thatcher walked out of a meeting with Deng in a daze. My guess is that Deng told her she could hand it back, or China would take it by force. Hong Kong isn't defensible against Chinese attack without a superhuman logistical effort and a huge manpower commitment. Let's say Britain wins. What has it gotten? A city in ruins. And at what cost? Hongkongers believed then and apparently believe now that they would be better off as a Crown Colony. But China isn't Argentina, and Hong Kong isn't the Falklands, separated from the mainland by 400 miles of open water.