When I was in Germany, P.O.W.s (personally owned weapons)needed to be locked up in the unit armory if you lived in the barracks. I have no idea how it was handled if you lived in post housing. I imaging that if you lived out in the economy, you had to comply with the local laws. Germany wasn't that bad at that time, things have gotten a lot tighter since, and I don't believe you can have POW's in Germany anymore, even on post.
I can sort of understand the policy actually. Allowing individual soldiers to keep their private firearms in the barracks is a hazard the military doesn't need considering the lengths soldiers go to to get bent on the weekends. Lets just say that the base stores sold A LOT of Robitussin along with the cheap beer and cheap Mad Dog 20/20, Boone's Farms, and Morgan David fortified wine. A lot of little scuffles would break out due to drunkenness and stupidity...add unregulated firearms into that mix and there is a potential for some real serious problems.
Since young soldiers don't really expect to be able to keep their POWs in their barracks, the restriction is not really oppressive. While our unit arms room did have a cabinet for POW's it was pretty well overloaded, and the guns were not particularly babied in routine handling. The smartest guys cased their pistols and locked those with their own padlock. Softcases on rifles (padlocked if possible) were also a good idea to prevent handling and storage abuse.