I do find this general discussion interesting, but it is of course serious. Under the Aviation Security Regulation (which is put in place under the Aviation Security Ordinance) , it is an offence to enter into the restricted area of HKIA unless you have a permit. There is an exemption for a bona fide air passenger. There are procedures in place for bona fide passengers to exit (as noted in this thread - basically with an escort) if there are flight changes etc..
Even if someone has a boarding pass, if they enter a restricted area without the intention to board (i.e. to use a lounge and then exit), then that person would probably not be seen as a bona fide passenger. If they enter with an intention to board but cannot because of a flight cancellation or other emergency, then they would have been a bona fide passenger when they entered and an escort appointed by the relevant airline can help. In other words, from a legal perspective, they should have a pretty good reason to leave, other than to go sightseeing or visit friends.