The reason there aren't less fancy, affordable apartments is people weren't allowed to build new apartments 20 years ago, which would have aged into affordable housing this decade.
Though the above does touch on what I think is really missing - a social safety net. I can see how high cost of living could lead to homelessness when you're trying to cling on after losing a job and can't find something to replace it right away. I fully believe we should help such folks, give them a safety net, just -not- in SF. There's tons of inland cities that are begging for people, let's solve two things at once. After they are back on their feet, if they want to move back - so be it.
At the end of the day, the homelessness problem in SF and other west coast cities is the result of the government looking the other way (i.e. not enforcing the law) combined with the fact that you can live outside most of the year.
The bay area isn't close to capacity. Even SF has 10,000 fewer people per square mile than NYC.
SF doesn't have to be a city just for the top 1%. But that is what it is becoming, directly because of restrictions on building too much housing.
Edit to add - I don't think the situation of 'keep moving' is realistic. Of all the thousands of cities in the US, only a handful have really had a price explosion, and the reasons are obvious - coastal, nice weather, and limited space. I can't see that ever happening in say, Olathe, or Tuscaloosa, etc. Austin for example has had an explosion, but generally has the room to grow outwards in a reasonable way in my opinion.
Not that I have the answers... Rent control would be interesting, but well, this isn't socialism, it's cut-throat capitalism, and landlords are out to make maximum profits, your homeless ass be damned!
But guess what, it works the other way too.
I grew up poor. Lucky to have a roof over my head. In a town where the local pasttime is hanging out in the Walmart parking lot and doing heroin.
Then I got a job at a big tech company. I had to beg and borrow just to move out here because it's so expensive to relocate. If I didn't have a friend out here, I would have had to sleep in the office until my first pay check (yeah it's fucked up).
Now my life and family are in a massively better place.
So what's the solution to homelessness? Relocate and/or retrain. It takes a lot of effort, but it's the only thing that works in a capitalistic country.