People from many countries can enter Hong Kong without a visa. It draws tourists and helps with many export businesses.
For this reason people in Hong Kong have not passed the stricter scrutiny applied to people who visit the mainland, so they have to be re-checked at the border.
It (still) has different laws, different visa rules and a different passport.
Why would an authoritarian government give up a preassembled internal border checkpoint? Makes sense for them to keep it.
Maybe they do it so they can count all tourism between the SAR as international tourism. Results in lots of gained face.