Yep.HK was essential for the modernisation and opening up of China at the time, a gateway for both China and the West to do business behind the scene. Taking HK by force would not have helped China at that time at all.
Consider some of the current negative circumstances and parts of HK to be the price it paid, in order to help China as a whole (HK has played a very important role in shaping current day China).
In fact, this applies to basically all of China and its provinces (the negatives/sacrifices that provinces and some cities have made can be quite different from each other, but overall, they were needed to shape current day China.).
As for fixing many of the problems, well, give it time (not to mention the central government is well aware of numerous problems, whether it be more specific to HK or other cities/provinces, but time is needed to tackle and handle them).