That’s a solution to drug addiction. Homelessness is not coterminous with drug addiction. You can be a drug addict with a home quite easily. It’s hard to be homeless and not use drugs or drink. You have numerous incentives to use and almost no incentives not to.
Take a stroll down the streets of SF or Portland and try to tell me it’s not an issue of drug addiction. There are already shelters in these cities for people in dire financial straits that aren’t addicts; the problem is they (and the rest of us) have to share these and other public spaces with deranged meth addicts. That’s what makes the current system untenable.
Most drug addicts lose their housing after some time, so housed drug addicts are temporary and in the way to being homeless. Addicts don’t work reliably enough to pay monthly expenses. They also steal and vandalize from people offering them housing, so again, very temporary until they wear out their welcome.
Many incentives are physical in nature. Can't afford food? Drugs and alcohol will make you forget you're hungry. It's more comfortable to sleep on the cold/hard ground if you're so high you can't feel anything at all.
You would be surprised what sort of drugs these people are using. They aren't paying for cocaine. They spend all day begging for pocket change to scrounge up $10 for some crap meth-like drugs who's sole purpose it to make you not feel anything. For the 4-8 hours after they take the drugs, they can forget everything they hate about their life and maybe fall asleep.
Realistically, strangers are quite happy to buy food for homeless people if they ask. So then the incentive is to get money to for "entertainment" and relaxation in form of drug use.