My grandma has been homeless for 20+ years, and she is an alcoholic. It's sad. She would really rather be on the streets than live with us, all because we don't let her drink. But i think she has some kind of severe mental illness that worsens her substance abuse. She is very delusional and paranoid even when she's sober, believes that she's being targeted by bad actors, that she needs a metal detector in order to unearth gold, and that we are stealing all of her documents. Unfortunately the doctors she's had have all said she is perfectly competent to make these decisions for herself, even if they aren't in her best interest.
I agree that homelessness is much more complicated than if you're addicted to drugs -> you end up homeless. Different people have different support systems, tolerances, and experiences. People who have supportive families and/or financial support usually don't end up homeless since they have somewhere to go. And there are many homeless people who do not have any substance abuse problems, and instead became homeless because of job loss or mental illness.