It's a common misconception that people experiencing homelessness are all junkies, but it's not true. A large number of homeless people are working poor. Estimates vary from 25% all the way up to 60%. If you sleep in your car because you're priced out of an apartment and you have a job, you're still homeless. Not everyone that's homeless has a needle in their arm, shouting at traffic on the street.
I would agree with you if this were 5 years ago. But the math you referenced is the data that’s been used to formulate a solution over the last decade and the problem’s only been getting significantly worse. So either your data is incorrect or the solution to build more housing is incorrect. Either way, the status quo problem/solution set is not working.
Every city in the state of California for many decades has failed to build enough housing to address the ever increasing demand for it and as a result people are losing housing. Every time rent increases significantly, homelessness increases significantly. The cost of housing in California cities and the Bay Area in particular has never decreased or even stabilized because we treat housing as an investment, keep it scarce through a number of local and statewide impediments to building, and expect outrageous returns on existing housing over time.
Most of the "problem homeless" are junkies. Overall homeless numbers include people in RVs, staying with a friend, and going to going to work day jobs.
Different types of homelessness result in different problems and different solutions.