Yep, those California gun laws may seem a bit draconian, but they sure do keep guns out of the hands of undesirables.
Course I do doubt that a soldier would be trying to buy a compact 9mm, unless all he ever learned about guns he learned in boot camp. Most of the soldiers I hear about that buy supplemental weapons are not trying to have a hide out piece, they're trying to buy something that actually might stop an attacker, like a .40S&W or a .45ACP. I have even heard that troops in Afghanistan are commandeering every target rifle the shooting team nearest their chain of command has.
Why, you may ask?
'Cause the rifle teams all use M-14's. That's a Rifle, chambered for a real cartridge, the 7.62x51, as opposed to an assault carbine, chambered in a varmint round, the 5.56x45. Not that there's anything wrong with the M-4. In fact if I was ever to be attacked by a swarming mob of groundhogs, that'd be an adequate weapon to have. But if it was me who was facing, for the right or wrong reasons, a human enemy that was trying to kill me, I'd have a Garand in '06. Yeah, you can hear the 'ping' when it's time to change ammo, but that's only if they can get close enough.
Think about it:
AK-47 chambered in 7.62x39 effective range of about 300 yards
AK-74 chambered in 5.45x39 effective range of about 300 yards
M-16/M-4 chambered in 5.56x45 effective range of about 300 yards
M-1 Garand chambered in 7.62x51 or 7.62x63 ( a.k.a. .30-06) effective range of about 600 yards
But as I said, fortunately California's gun laws don't allow undesirables to purchase weapons. Especially when they're needed.