What if one of the pilots suffers a heart attack, and needs immediate attention from a doctor. If they install in doors that cannot be opened by pilots or FA's, then the pilot would probably end up dying in his seat... I doubt it will ever happen like that. And since there won't be such a door, having a gun in the cockpit would be just as bad. The terrorists would have more of a reason to try to get in the cockpit to get that gun...