And the Bay Area as a whole wasn't cheap in the late 80s. (SF may have been cheaper because, as you suggest, upper middle class people weren't rushing to move to SF or most other cities in that period.) But I turned down recruiting from the Bay Area during that period in part because the cost of living was too high relative to where I lived on the East Coast.
The only time SF was every really cheap was during the 70s into the late 80s, which was due to a combination of white flight, the Loma Prieta earthquake, and the AIDS plague depopulating the city. Apart from that anomaly, it has been super pricey ever since the Gold Rush.