So you're saying if you buy a house, you will be making incredible gains. If not, then you will be making gains at least as good as everywhere else. Sounds like win-win to me.
There are very few assets that return 10% annually for 20 years. It's impossible to know what will happen in the next 20 years, but owning a house in the Bay Area for the last few decades would have been a much better investment than paying a little less for rent and investing what's left over.
6x in 20years is lower return than stock shares in most of the employers that have been driving up housing prices (for obvious reasons -- those companies' growth are funding the housing price gains)
Besides, 10% is about the long-term S&P 500 average return.
Not to mention that by owning you have to pay property tax, which should be considered when comparing investment returns.
It is normally a Bad Idea to invest heavily in your employer due to the Putting All Your Eggs In One Basket principle. If anything happens, you lose your job and investments.