Forget the comedy, this has security implications:
An Air Canada pilot who left the flight deck to visit the washroom found himself locked out of the cockpit when he tried to return—forcing the crew to remove the door from its hinges.
For approximately 10 minutes, passengers described seeing the pilot bang on the door and communicating with the cockpit through an internal telephone, but being unable to open the cabin door.
Eventually, the crew forced the door open by taking the door off its hinges completely...
Gosh, that's nice to know. Comforting.
I suppose if the pilots noticed someone trying to take the door off the hinges, they could take corrective action easily, like inverting the plane or diving (which pretty much stops all movement in the cabin). But still, that seems like a little security issue, doesn't it? Sort of like having a debug mode on a login prompt?