I'm a Marine, so this is a bit of a sensitive (and controversal) issue.
The military pays a "Basic Allowance for Housing" which, unlike my early enlisted days, is now pretty well indexed to the real costs of RENTING in the geo-location. Those who elect to buy (as we did), do so at their own risk – and its not terribly smart if you aren't sure you'll want to keep the house when you move (generally ~3 years) or that the market will be up enough to offset the transaction costs. As costs have skyrocketed, BAH still does an okay job of paying rent for "appropriate housing" but won't cover most mortages.
As far as requiring charity… Honestly I think there's an awfull lot of personal choice here. When I was a young private, no one was married or had kids. Now, as a reasonably senior officer, about half of my first-term Marines are married and/or have kids. A Marine is paid fine (obviously you could argue he deserves much more), but the pay scales are really designed to support the hardcharger living in the barracks and eating in the chow hall. For him (or her) to try to support a very young (and consequently marginally employable) wife, generally on their first time away from home, with one or more children and little life experience is a real challenge.
A former Commandant tried to establish a policy of not allowing marriages or dependents until reaching E-4 but was shot down immediately by Congress (et al). God love 'em… but from the DoD level there's a big impact on readiness, volume at the hospitals and other family support services, and additional costs/allowances.