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.
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?
What happens in these scenarios?