I've known a couple of homeless people more than superficially.
One had an abusive childhood and was thrown out before they could find a job, living in squats for a period before getting a job and accommodation, eventually marrying and having children. In his case he was made homeless by his parents, and could not avoid it.
Another, we connected with through the church - he came to a Christmas meal we were ran each year for the local community, and because he'd preyed on the good graces of someone local to provide accommodation, he was living in the area. Eventually he became too much for them, and having returned home drunk & then gone out again, they moved his stuff outside and locked the door (they were really scared by this point). I didn't know then quite what had happened, but realised the person he showed us was different to the real individual, fortunately I didn't offer him to come & stay with us, but put him up first in a travelodge, then in the church building with a strict 'no alcohol & drugs' rule, which he broke within 2 days. We'd arranged for a possible place in rehab with the local salvation army, with the one snag that he had to be homeless before they could take him - meaning he had to spend a night outside - so he had to be made to leave the church building in order to be homeless so he could be taken in. This caused much grumpiness because he had no intention of doing rehab, and just simply wanted free living and booze. AFAIK he left the SA accommodation quickly & convinced a Catholic church in Oxford to give him a flat.