They didn't have much choice. The new territories had to go back because they were leased. So all that they could have held on to was Hong Kong island and Kowloon. There wasn't the infrastructure to maintain those areas. And China was a very different place in those days, the insane crap that they said to the British during handover negotiations made anything Donald Trump saying today look intelligent... It was a stressful time to be living there. So today Hong Kong is a Chinese colony instead of a slightly (yes, slightly) more benign British colony.