There is a very good reason why the crew inside the cockpit can override the emergency code, the event someone under duress is using it.
So, how do you stop one of the cockpit crew using this "special code" under duress??
Can't can you.
The cockpit needs to be kept safe, end of story.