When travelling between UK and Ireland, passports are mandatory for non-UK/non-Irish Citizens, and on arriving into Rep. Ireland, everyone must go through Passport Control. Is it because you are technically leaving the Common Travel Area on departing UK (the implicit 'sign-out' occurs when you board the aircraft), and then immediately re-entering it on arrival? As a comparison, the equivalent situation for the Schengen is that some flights within the Schengen area (which possess 5th Freedom priveleges) subsequently continue Longhaul, and if you want to travel only on the internal sector, you still need to go through Passport Control, both on departure and arrival (e.g. S4 LIS-PDL-BOS, SQ BCN-MXP-SIN, some of these itineraries may no longer exist). Now if my hypothesis is true also for travelling from Rep.Ireland to UK (e.g. on HU PEK-DUB-EDI), and if you implicitly 'sign-out' when boarding the aircraft in Rep Ireland, then why are you not 're-entering' the Common Travel Area on arrival into UK, as there appears to be no Passport Control on arrival? This is a particular issue for the example that I quote, as it is actually a 'triangular' route.
You don't exit and re-enter the CTA; rather Ireland's application of the regime doesn't involve an open air/sea border with the UK, and Ireland processes arrivals from the UK separately (if arriving from Northern Ireland, non-EU/EFTA citizens are to report their entry)
In your example (PEK-DUB-EDI), passengers would either disembark at DUB for border control and re-board, or clear immigration at EDI. In the latter case, AFAIK British/Irish citizens travelling DUB-EDI could still use e.g. a driving licence and birth/naturalisation certificate to prove nationality