Why is Cravath raising salaries while 85% of legal grads are taking jobs making half or less of its old salary scale? Because it has a hiring floor. It won't hire lawyers that aren't at least one standard deviation, if not more, from the mean.[2] Their demand is high--each lawyer generates on average $1.3 million in revenue--and supply is limited to the 10-15% of the market that meets the hiring filter.
I suspect the same is true in the tech industry. Google, Facebook, etc. don't hire candidates who can "do the job." Like in law, there is this idea that it's important not just to have competent programmers, but programmers who are smarter than your competitors' programmers. These firms limit their pool of hires to those who, by their metrics, are one or even two standard deviations away from the mean.[3]
Meanwhile, everyone else is willing to hire the median programmer. They can do the job, and there isn't the same idea in that segment that it's worth paying much more to have people who can not only do the job, but do it faster/better than your competition.
[1] How this group of highly profitable firms continues to exist despite market competition is outside the scope of this post.
[2] Cravath measures that as a function of law school rank and class rank. No comment on the validity of this model.
[3] Again, no comment on whether going to CMU and acing interview puzzles makes you a top programmer. What matters is that these firms think it does.