Earlier quoted context omitted.
If you don't return something at the end of a contract is that theft? or piracy? Its not like the UK had a choice. We're you expecting them to go all Hawaii on the situation and just annex it?
The government they made the contract with didn't even exist anymore. The Qing Empire made that contract with the UK. Independence or just keeping HK in the UK both make at least as much sense as giving it to a country that didn't even exist when the contract was formed.
You really want to set the precedent that regime change voids all international agreements, rather than obligations and rights under them passing to successor regimes?