Team Google is a juggernaut with the funds to match, so they see value in putting up the money to get the top performer. They don't care how much luck the guy had to get where he is or how fair the pay is. They operate at a scale where small performance gains mean huge impact, so getting the guy who can make things go well (or who is less likely to drive the whole org off a cliff) is a bargain at any price. And let's not pretend we all know how to be CEOs of giant companies.
I personally don’t think Sundar is an amazing CEO. He is very conservative and boring. But at the same time Google has tended to be too reckless and fund many projects with speculative ROI, or with no cohesive strategy. Google is making the shift to selling to enterprise and government where a level-headed conservative CEO inspires a lot more confidence than an ambitious reckless one. Also, they have one of the greatest businesses ever to exist (search ads) which, compared to any other >$100bb business, is a lot more precarious: it’s not contingent on long term enterprise contracts or lock-in or a physical moat (supply chain, brick and mortar presence).
His job is to keep the golden goose laying eggs and to make sure Google succeeds the transition to enterprise software. Believe it or not he’s more qualified for the job than all the other SVPs at Google and because he’s well connected with the founders he’s not a wildcard like an outsider would be.
It's like a plumber coming over and hitting a pipe with a hammer and charging you $300. You paid $5 for the effort and $295 for the knowledge of where to hit the pipe.
I mean how hard is software engineering? Should people be paid $500k? Garbage collectors work harder than most FAANG engineers I know.