Yeah. I get that there are safety issues, but something is wrong when people don't have anywhere to go. As for homeless shelters, there are horror stories about those places, so no, that's not always the answer.
You can build some pretty neat (almost hobbit style) houses out of DIRT if you possess the knowledge to do it safely, and you can give them as many rooms as you want! How much does dirt and knowledge cost? And yet somehow there are still homeless people.
It's really tragic, because it doesn't have to be this way.
Had a homeless friend explain that he felt safer under a bridge than in a homeless shelter, which said a lot to me about the conditions of shelters. He also explained that some nights he couldn't get in...if he was late or if they were full up, so most nights he stayed away from them.
Saw a YouTube video about earthships in New Mexico, they seem awesome. The architect had to fight with the New Mexico congress to get them classified as experimental housing because the first neighborhood he build got shut down for not meeting the housing guidelines (meant for traditional structures).
So many options available, but government ties our hands or forcibly removes us. You're right. It doesn't have to be this way.
Based on the things I read, it sounds like your friend is probably very right in thinking so.