Hong Kong is being administered under it's one country, two system policy.
QANTAS formed Australia Asia Airlines to operate exclusively to TPE from BNE and SYD. After a couple of years operating this route, they merged AAA into the parent company, as half of the flights were being operated with QF aircraft anyway. Australia has a good relationship with mainland China, and as such no longer felt the need to pander to the Chinese government. It is amazing that European airlines such as BA, SR, KL, AF still operate into TPE under *subsidiary* companies.
The main route where what you mentioned isn't the case is into/out of Japan. Japan Air Lines formed Japan Asia Airways to operate flights into Taipei and Kaohsiung, so that the parent airline could continue flying into mainland China. These flights continue today.
The Chinese government demanded of Japan, that only their aircraft would be allowed to operate into Narita Airport, thereby leaving China Airlines operating into Haneda (and still the only foreign carrier operating into HND). CI is on a bonus, as congestion takes it toll at NRT, they are able to increase their services at demand requires, without having the problems of slots.
Also under the political system I mentioned above, flights continue between HKG and TPE/KHH. The mainland Chinese government really could not afford to stop these flights, as the Taiwanese have billions of dollars of investments on the mainland, and the money makes it way thru Hong Kong. The same goes for any other country whos airlines serve both mainland China and Taiwan.