And there is the matter of a grenade with the pin out.
In this case, as in the case of a terrorist using an RPG or placed explosive, the gun has a zero net effect on the outcome. (Is the bad guy going to put the pin back in before he flies the plane into a building?) The point is moot. Compare it to trying to use the apu fire bottle to control a rapid depressurization.
In the case of a determined hijacker(s) attempting to wrest control of the aircraft away from the pilots, the gun can have a positive effect. Without it, the pilots (and everyone else on the aircraft) are dead anyway. The firearm gives the pilots more of a chance of keeping control of the aircraft.
As far as "trusting" pilots with guns is concerned. Any pilot that can't be trusted with the responsibility of handling a gun, can't be trusted with the hundreds of lives and billions of $$$ of liability that he incurs every time he goes to work.