One reason for buying a house (instead of renting) and carrying a mortgage (that you can afford) and making the payments on time (of course) is that it can increase your credit score over time (after an initial credit score hit).
See:
https://www.investopedia.com/article...dit-scores.asp
Buying can also be less costly (after taking into account the tax benefits) and there are the intangible benefits of just owning your own home and being able to do w/it pretty much whatever you like (w/in the limits of zoning laws and any HOA restrictions).
Just depends on your specific financial situation and desires but given the very high cost of renting in the Bay Area and the historically low mortgage rates, this is one of the best times to evaluate whether it is better for you to buy instead of rent.