If you didn’t already think allowing guns on planes was a dumb idea, this ought to convince you.
Bullets have been known to kill people. If such a person happens to be in the cockpit, the plane could crash. Bullets have also been known to depressurize planes. If said bullet pierces the cabin, the plane may not crash but will certainly need an emergency landing. If the bullet simply got lodged somewhere but the shot occured at a critical phase of flight (um, landing, for instance), the distraction could cause the pilots to crash.
A Kevlar-reinforced flight deck door is plenty. Allowing guns on plane is a dumb idea. Dumb, dumb, dumb. The pilot in this case should be terminated.
The stories are nearly content free. There are a lot of questions that remain unanswered with the official answer being along the lines of, “Trust us, we’ll investigate”. I find it hard to imagine the circumstance that would have allowed a properly maintained gun, that was properly handled to be set off in a cockpit with no threat present.