The part that I didn't factor in was rents basically tripling while I was here, which apparently is not an uncommon occurrence in the Bay Area. In 2010 I was a genius for paying $1400/month in rent rather than $4000/month to buy a condo. In 2017, when rents were $4500/month but that condo payment would've still been $4000 (for a bigger place!) and the condo's value had gone up from $400K to $1M, I was less of a genius.
YMMV. I'm expecting very significant inflation and I've watched firsthand as a lot of my friends got priced out of the Bay Area, so I bought as a way to ensure that my kid will be able to stay in the same school district and remain near family. Time will tell whether that's a fiscally brilliant or fiscally idiotic decision.
I have a few older retired friends that thought this, then the area started gentrifying, prices went up and they've had to move out of the area they've lived in all there lives.