I lived on the streets for a time. I still talk to some of my friends, who are homeless still. There's too many "reasons" to even try to count.
I know a mother and her 17 year old child who was kicked out of the high barrier shelter because of a fight/disagreement. The high barrier shelter ejects quite a lot of people.
I knew some homeless who did have jobs, but they were 2nd and 3rd shift. High barrier shelter closes doors at 6pm. So shelter is only for homeless who work 9-5, I guess?
After our low barrier shelter was dismantled, quite a few alcoholics and drug users were summarily thrown in the street. Alcohol and drugs at least makes you forget the horribleness of it all, for a time. Is it a solution? You damn straight it is, for right now. Not like you have strong prospects.
I knew others who had significant mental health problems. What were they? No clue. I'm no doc. But some seemed to be from too much drugs, others from existing conditions. Some seemed to be from PTSD cause they were soldiers. It's a cornucopia of why's for mental health.
Some fell through the cracks. They fell on hard times and had one too many shit events happen. Car repo'd or evicted, and no personal social net (friends). They'd hop out if they knew how. We recently housed a friend who had this issue, so he wouldnt come crashing down.
Some do like it homeless. They've lived it long enough that its now what they want. Nobody tells them to do this, or that, or when. They just live a meager existence. Not many of these, but I ran across a 3-4 of them.
But overall, I'd say that most I ran across would highly love to have a place of their own, even if it was small. The only exceptions to that would have been the ones severely mentally ill and the ones who want to be homeless. And I'd argue about the severely mentally ill - they just seemed to be, and not be. They were surreal. Ideally, they should be housed by the state in wards. (Yeah, when you wander in a grocery store and pick up something cause its food and they were hungry, logic and stealing just goes out the window.)