It takes a pretty good return on an investment to make back what you lose on rent.
The point I'm making is that buying a house is an investment, and renting is not.
I've done both, I've rented for long periods of my life. In San Francisco, among other places. I've also bought two houses.
I wish I had seen the economics of buying much sooner, because renting is throwing money away. When I was younger I was comparing mortgage payments to rent, and it didn't seem to make much difference. But if I'd realized that rent is gone and mortgage payments come back, I'd have tried to buy much sooner.
Renting is more expensive than buying in every county I've ever lived, including SF. So the argument that you could rent and invest instead of buying doesn't make sense to me. If you can rent and invest, then you can buy and invest. As long as you can afford the down payment, which is the main barrier to entry.
In your example, I could end up with 927k, but you have to subtract your rent. If your rent is 3k/mo, then you'd have spent 375k on rent for a net return of 550k. And you had to pay both the 3k/mo investment and 3k/mo rent at the same time.
Chances are pretty good in some places that if you buy a house for 350k, after 10 years it will sell for 550k, and you could still afford the side 3k investment per month and get the 927k on top of it, for a total of ~1.4M.
It still seems really clear cut to me.