Unique technical skills. For example when Google decided that they wanted to built V8 (JS JIT) they couldn't just entire anyone who's read some JIT book one time, they need someone with genuine expertise, publication history and leadership in the field. There are only like 50 people max in the world who could do that. They also needed a GC for that JIT, so they need another expert in that field. Those people get the big bucks.
The guy who runs the self-driving car project at Google earns tons, and he's not just someone who picked it up as he went along. He picked something, became and expert when few others did, so when Google wanted to hire him, he could argue that if you don't hire me there are only like five other people you could even ask to do this, so he could negotiate for a very high salary.
So you need to become a genuine expert in something, with a publication history to back it up.