Imagine how much money can be saved by shaving 5 percent off an annual AWS bill of 10 million dollars. (dont forget to factor in present value of future year's savings!) Now imagine a company like Google that spends way more than 10mil on infra. And even if your infra is cheap, virtually every tech giant has shown that shaving 100ms off a request is a massive boost to customer engagement metrics, so maybe it _shouldn't_ be that cheap. And product teams are just as valuable, if not more so.
That explains the demand. On the supply side, people who can actually do the work are hard to find. There's a massive gulf between having a degree in CS and actually making good on improving complex software. I've watched like three teams fail to deliver on a GSLB[1] optimization tool. Two of the three iterations didn't recognize this as NP complete (bin-packing, essentially) and the third is learning the hard way that there's calculating an optimal response is only part of the problem -- you also have to change state without inducing outages on the receiving end, and a naive SAT solver won't produce that. Beyond that, bay area is expensive to live in, and is high tax. $634k becomes more like $300k, in a city where you might spend $5k a month in rent. So there's definitely a _floor_ to salaries.
Also: once all this is accounted for, retaining talent with equity grants has a side effect of accidentally pushing wages above target. Some places like Amazon seem to explicitly take this into account when issuing refreshers, others not so much. Which means to hire someone away from Google is really hard. But really easy to recruit from Meta at the moment, as their stock has fallen 60 percent so income has fallen as well. Beware of the double edged sword.
[1]: https://www.cloudflare.com/learning/cdn/glossary/global-serv...