Sawzalot makes an interesting point, although done in a roundabout manner
. Let me take a shot....
Question- If the cockpit doors are so secure that they cannot be opened from the outside, then why do pilots need guns?
Let's say that terrorists take over a plane and threaten to kill everybody on board unless the pilot opens the cockpit door. Given what happened on 9/11, pilots should be (at least I hope) under strict instructions never to open the door in a stress situation. Their first course of action should be to safely get the plane out of the air and onto the ground so that trained authorities can defuse the situation (e.g. kill the bastards with extreme prejudice) as quickly as possible. Since the cockpit door is 100% secure, or so we're told, the pilots would never be in danger and would never have to open the door, and would therefore not need a gun.
I assume that the counterargument back would say something like "but if the pilot has a gun couldn't he defuse the situation and save the passengers?" Possibly, but doesn't that go against the first objective which is getting the plane out of the air? If the terrorists were to take hold of the cockpit everybody on the plane is probably going to die anyway, particularly if they are able to relock the secure door, and thousands more on the ground could get hurt as well. If there are 10 terrorists on a plane with box cutters, brass knuckles, or even just their fists, how much good is one guy with a gun going to do? The terrorists clearly don't care about living or dying, once the cockpit door is opened it would only be a matter of time before they overpowered the man with the gun and potentially took the cockpit anyway. If we're talking about only 1 or 2 modestly armed terrorists, there's a much better chance that the passengers would overtake them without putting the cockpit of the plane at risk.
Finally, considering the scenario where the supposedly secure door is able to be breached, is a gun really going to serve somebody well is such a tight space like a plane cockpit? I've flown several hundred times in my life (I used to be a consultant and traveled at least twice a week), and the cockpit has about as much space to maneuver as the bathroom. I don't know much about close-quarter hand to hand combat, particularly not with weapons, but I cannot imagine that the guy with the gun will have a significant advantage over the attacker. Plus, if the cockpit door has been breached the chances that something really bad is going to happen go up exponentially.
All of that said, if it makes a pilot feel better to have a gun stowed securely in a cockpit then I'm all for it, particularly if it will improve his or her state of mind. However, with the exception of the third situation I listed I cannot imagine a scenario where I think its a good idea for one of the pilots to even open the door and potentially expose the cockpit just so he/she can use the gun.