At GOOG/FB a large chunk of that comes from equity. 400k for a senior+ level engineering job at one of the "big" tech co's in the valley/SF isn't outrageous at all. Base salary ~200, bonus/equity another ~200.
The taxes on equity are a huge PITA when equity is a large fraction of your salary. This is because they withhold at only 25%, even if your tax bracket is higher. This means you have to file quarterly estimated tax payments or over-withhold from your salary.
I much prefer Netflix, where I just get salary. I might even be able to do my own taxes again!
Sheesh!
But it's also a tax hassle...though it's hard to complain about it.
Or a hybrid (pay a reasonable amount in estimated taxes but don't put any serious effort into getting it exact).