If there is a ruckus in the cabin, the armed pilot will stay in the cabin and defend the cabin from attack.
In Miami, a Federal Air Marshall prevented a terrorist from setting off a bomb in the terminal. One shot in the jetway stopped the guy. The program is worth it!
I had forgotten that. Do you have a link to share for that?