I believe that the military's reason is more pragmatic and systemic:  Weapons carried daily by troops get damaged, lost, rusted, or stolen.  Daily carry may be necessary in a war-zone, but not in state-side barracks.  Ammo is restricted because it "vanishes" so often, mostly due to unofficial, off-base target practice.  Troops could be issued individual gun lockers, but it is much more efficient to manage inventory and control weapons in the armory.  Terrorist acts on U. S. military bases is a relatively new phenomenon, and the bureaucracy is responding in its usual glacial manner.