door is locked, as per security requirement
There's two kinds of door-lock modes -
- Locked, but can be unlocked with code that crew knows. "Pilot going to bathroom mode."
- Locked, but cannot be unlocked with code. "Hijacking - No one's getting in mode."
In your example, co-pilot suffers seizure, pilot unlocks door with code and flies plane.
What wasn't anticipated was co-pilot putting door in hijack mode then hijacking plane himself.