To be clear the flow is: tech companies make enormous revenue but require high skill workers. To make this work they pay whatever it costs to get workers and no more - in this case that means just enough to offset the enormous cost of housing.
Since the baby boomers practically banned all housing development in the bay once their little burns were built, this result in a little see-saw battle where landlords raise the rent until tech companies are forced to raise wages, back and forth. Employees are left with an equation that looks basically like: enormous salary - obscene rent = just a bit more cash flow than you’d earn in software anywhere else.
Thus the flow of capital is from tech companies to landlords, in an arms race that will only end when the landlords have taken so much of the capital out of tech that the industry sputters and moves away.
It's probably true that the cost of minimally acceptable housing drives entry level tech salaries, but they go way up from there. A senior SWE at Google with salary+bonus+stock of $300k/year has a whole lot of disposable income even after the ridiculous housing expenses.
The simplest is families living on one income. In most of the country this is easily achievable if you can break six figures, but in SF housing is priced for two full area incomes, so if you want to make it work with one parent at home you either have a relatively small and ratty apartment (compared to housing stock elsewhere) or you spend $6000+ per month on housing which takes a dramatic bite out of that $300k you’re taking about.
In the case of the building I live in (in "downtown" Sunnyvale), the three front office workers and two maintenance persons come nowhere near making a dent in the $4.5 million in income this one property earns yearly. Can't speak to the wages of the staff in the other >12 buildings in the portfolio, but the folks keeping this place running aren't driving Teslas.
They often aren't, they are saving it (effectively, often directly, investing in the global capital markets and/or, insofar as their compensation has an equity component, directly in their own firm.)
For example, Essex: https://www.essexapartmenthomes.com/about
They're even publicly listed: NYSE:ESS
Or the Irvine company, after which Irvine, California is named after because they designed the city. https://en.wikipedia.org/wiki/Irvine_Company
A fun fact is that the University of California, Irvine, was named that six years before the city was incorporated.