I think that's an unfair generalization, and one largely made on assumptions of what we as a society think drug addicts look like(unkempt, tattered clothing, mangey hair, bad teeth, erratic behavior). Really, if you remove modern conveniences like hot showers, laundry, ability to store food, and secure place to sleep, most everyone will start looking like that. Physical and mental health for anyone would start to decline, and the more vulnerable would have a harder time recovering. And not just genetically vulnerable- those who have fewer social resources(family, friends, community) will have a much harder time pulling themselves up.
For many, it is a hole they have fallen in and cannot get out of it on their own- and there isn't always help available. It's an uncomfortable reality that most above the poverty line would choose to ignore or can't fathom. Much easier to cast off societal problems onto this class of impoverished people, with a line of thinking along the lines "they made decisions(drugs and not working) and now they must accept their fate(homelessness)". But people who come from wealthy families don't become homeless(at least not for very long) because of drug use- it's only the poor who become homeless because of drug use.
The truth is that it's a much more complex social problem than it is an individual problem. Inevitably it becomes about lack of resource for people who are looking for help, and then the criminalization of homelessness and mental illness. If you ever spend some time in a local jail you'll probably quickly realize that most everyone in there isn't a bad person- maybe guilty of acting foolish in desperate times, but not bad people. A lot of jails serve as holding cells for mental hospitals. And yes, when you start looking at specific types of homeless populations, like those involved in the criminal system, drug use becomes a prevalent factor. But it's a false equivocation to take that observation on a specific subset and apply it to all. There are homeless who do not drink or use drugs, and some who only use minimally(less than a lot of middle class americans), and some who binge(usually end up in jail/prison).
My point is, drug addiction isn't the biggest factor to homelessness. It may be a common factor, but even if it is common among all it would be overlooking the common financial and social situations that are truly causing the homelessness. I'd imagine most people on this website can imagine if a few specific family members were to die of a freak accident/illness, a few others lose their jobs and houses, and either you or a family member or two might be pretty close to living in their car if not on the streets. Take all the fires in CA for example- the death of family, loss of property and housing, and loss of job could happen to some literally overnight. We have resources and people actively trying to prevent massive homelessness, yet even still some will be less prepared than others.