I think the real problem is that there's a minimum required to not be homeless in most developed nations. There are ZERO apartments in most areas that would be described as "basic", having just a bedroom and a bathroom and a kitchenette.
We are therefore burdened with having to have middle-class income to even live within the law. Nobody builds basic, poverty-level housing anywhere. This means that while you work in a gas station or restaurant, or wherever you're underpaid or not employed within your primary career, you're shit out of luck. This affects college students whose parents do not contribute, or can't, and disproportionately affects teens who grew up in state care as orphans or wards of the state.
In those circumstances, when you turn 18, you're turned out onto the streets. If you make it, fine. If you don't, nobody cares.
Having a brother in law who grew up in state care and who is currently homeless, I am always surprised at the sheer number of homeless people who have similar circumstances, and cannot get out of it because to maintain a job, you have to have a place to live, and to have a place to live, you have to have maintained a job long enough for first and last month's rent, a security deposit, and you have to miraculously have a decent credit rating, somehow, after being homeless.
It's one of those things where there's a crack in society, and once you're in it, unless a miracle happens and someone offers you a place to stay for basically free, you'll never get out of it on your own.