Yes, exactly. That's why claiming the salary has anything to do with productivity is absurd. It's a combined measurement of how badly the company wants your skillset and how well you can negotiate.
Well, sometimes it's because your friends are on the board of directors, and they are doing you a favor (with someone else's money) in the hopes that you will return the favor to them when the time comes.