Why?
The British lived up to the agreement they made, just as we all should.
From the Wiki:
"In 1898, the British and Chinese governments signed the Second Convention of Peking, which included a 99-year lease agreement for the islands surrounding Hong Kong, called the "New Territories." The lease awarded control of more than 200 surrounding small islands to the British. In return, China got a promise that the islands would be returned to it after 99 years.
On December 19, 1984, British Prime Minister Margaret Thatcher and Chinese Premier Zhao Ziyang signed the Sino-British Joint Declaration, in which Britain agreed to return not only the New Territories but also Kowloon and Hong Kong itself when the lease term expired.
China promised to implement a "One Country, Two Systems" regime, under which for fifty years Hong Kong citizens could continue to practice capitalism and political freedoms forbidden on the mainland."
And a timeline:
https://www.bbc.com/news/world-asia-pacific-16526765