Say someone flies from A to C, with a same-booking connection in B. Their travel document does not need to be, and in this case isn't, accepted for entry by B. It also cannot be endorsed with stamps or visas, so emergency visas cannot be issued.
However:
Whilst in transit the airport has to be evacuated, or
The connection is cancelled due to bad weather and the next one is the day after, but the airport closes at night (and only allows for same-day transit without entering the country)?
What happens in these scenarios?