TL;DR: Home ownership saves you on rent.
Yes, you replace that rent with a mortgage payment, but you gain equity and eventually stop having to make the mortgage payment (i.e. you pay off the mortgage).
In the Bay Area (which I take to mean the San Francisco bay, not Boston, Chicago, or somewhere else with a bay), you may borrow $500k on a relatively modest house (the maximum deduction if you itemize). Assuming a mortgage interest rate of 4% (which is actually high recently), you would pay around $20k interest the first year. Let's figure property taxes as $3500. So that's $23.5k of deductible value. If you are married, your deduction for not itemizing is $24k. Unless you have other itemized deductions, there's no point in taking the mortgage interest deduction. And remember that the interest paid will decrease over time as you pay off the loan. Once below $200k outstanding, the interest probably won't even cover the $12k deduction for a single person.
One of the big advantages of a mortgage that renters do not get is that the mortgage payment is constant over time. If rents are increasing, then it doesn't take that long for even a higher mortgage payment to drop below the rent. At 3% a year, it takes about sixteen years, a little more than half a thirty-year mortgage. And of course after the thirty years, you pay no mortgage but would still pay rent.
Another big advantage is that at the end of a mortgage, you have a house. If you rent for thirty years, at the end you have nothing. You get zero return on your rent (other than a place to live, which the mortgage also gives you). So any equity value in the house is superior to the zero equity of renting.
These advantages are offset by the flexibility of renting (move whenever the lease is up or even break the lease to move early) and that renting may be cheaper than the mortgage payment. Historically that wasn't true. The typical rent was roughly equal (give or take 10%) to the typical mortgage payment. But recently rental rates have dropped below mortgage payments. This is one reason that there were so many foreclosures around 2008. People couldn't even move out of their houses and rent them to pay their mortgage.
Home ownership should not be expected to make you rich. That was an unrealistic expectation that ever upward prices in some areas provided. The real point of home ownership is to allow you a place to live.
Some people also gain in retirement. Because they needed a family-size home earlier. They had children. But the children are gone by retirement, so they can sell their large homes and buy smaller ones. Or both pairs of my grandparents had several acres of land. The pair that moved bought a smaller house on less land. But this isn't home ownership making them rich. It's downsizing.
When comparing renting to home ownership, remember that with renting, you will have to rent past the mortgage period. With homeownership, if nothing else, you have the house. The most vulnerable period of homeownership is the first five years. In that time, you are likely to have received less value from the lack of rent than you lose in transaction fees in buying and selling the house.