Almost everyone living on the streets is there because of a series of choices which they made, usually over a long time frame. Perhaps at the time they were not entirely voluntary choices, or conscious choices, but cumulatively they have chosen a certain pathway that led them to losing their income, job, belongings, and housing. Even an abused wife who's been dumped out by her husband, well, she did choose that husband.
Obviously there is nobody who rises from a warm bed one morning, says "screw all this!" sells all they have and goes to rough it on the streets (except, perhaps, for Saint Francis of Assisi, but he found something productive to do.)
I spent a lot of time Downtown hanging out with minors, and one day my good friend who's a dad confided to me something surprising. He said "Most of these kids aren't homeless or runaways, you know. Most of them are from wealthy neighborhoods and have good parents, but they come out here just to mingle." So it was like Future Runaways of America out there. And make no mistake, the area has a huge effort of outreach to runaways and homeless minors.
Once someone winds up on the streets, more choices are offered. Those choices can either drive a person deeply into a hole from which they will never recover and never get off the streets, or they could just keep them going while they can stabilize and find needed services, and begin a process to get off the streets. Many people will pursue the former. Even if they pursue the latter course, they may not make it. And then you have people who realize, hey, this life is ok for me. I guess I don't mind it so much, and it's not worth trying to get housed. So they stay as-is for the rest of their lives.
There are shelters all over the Bay Area that stipulate no drug use. They are complete with transitional housing and job placement programs. The same is true in other west coast cities.
I’ve been very close with formerly homeless people in SF, and they said the exact opposite: people choosing to be homeless move to SF because it’s the nicest place to do it in the U.S.
In other words, homelessness is very often not a root problem but a symptom of other underlying problems.
What's your policy towards them?
You said that homelessness is a symptom of underlying problems, which is true, but also said, "You need to address the issues that cause people to act like that". Sure, this will work for some, but not others.
I am genuinely asking what you propose to do about the people for whom this is not feasible or possible - whose underlying problems we cannot address.
This is serious stuff which no government wants to touch with a 10 ft pole. When you go down this train of thought it gets pretty dystopian pretty fast. So far we have used the law to judge these people and their actions. But when mental health and poor upbringing is considered, the law is an extremely blunt tool for the job.