The cause for homelessness in California, where between 25% and 50% of all US homeless live, is a severe shortage of affordable housing. Why do all these people live in an expensive state like California? Because it's -1ºF in Minneapolis right now. The minimum estimate of homeless in California is 130,000 (the 25% of US estimated total).
People become homeless through several routes--everything you listed, plus poverty and rising rents.
The solution that makes the most sense to me is HOUSING FIRST. Get people into good quality SRO rooms with services or small apartments with services. Once people have a warm, secure place to sleep, take a bath, keep dry, and so forth they start doing better. Provide services with the housing: addiction treatment, assistance with medication (obtaining and administering), and access to adequate food.
Housing First with services reduces ER visits and expensive treatment (county expense) for neglected disease. It improves the quality of life for those now housed, and also improves the quality of lie for everyone else.
At $50,000 for a built-to-purpose unit of SRO or efficiency apartments, California could house 130,000 people for about maybe $7 to $14 billion. Isn't that a lot of money? Yes, it is but Bill Gates could buy 130,000 units of housing and afterwards still be among the richest people in the world. Ditto for several other billionaires in California and elsewhere in the US.
Arranging affairs for the benefit of the rich and property owners is one of the reasons why there are so many homeless people. It's only reasonable to claw back some of those dollars -- about, oh, maybe $20,000,000,000 worth--for housing first across the country.
Cities used to have skid row areas where men (usually) could find the cheapest possible housing: warehouse floors divided up into small rooms with plywood and chicken wire with a lockable door. It was a step up from sleeping on the street--not a big step up, but slightly better. Cities used to have a lot of ratty apartment buildings where poor people could live -- with water, toilets, heat, and privacy. Probably plenty of cockroaches and bedbugs too, but it was a step up from living in the warehouse box-rooms.
Some cities used to have SROs -- single occupancy hotel rooms. You got a bed, a window, a radiator, and a lockable door--quite possibly a sink. The bathroom was down the hall. These were also a step up from living on the street or in warehouse-boxes.
These poverty-linked housing options are pretty much gone in most cities--torn down, redeveloped into loft spaces, turned into condos (provided the building bones were very good), and so on -- but no longer available as cheap housing. So, that's another reason why people are homeless.
BTW, the GDP of California is $2.751 trillion -- bigger than the GDP of the UK. California has one of the biggest economies in the world.