Value creation is by far the pre-dominant variable when one thinks about compensation. Arguably, there is more value creation in the process of programming (infinite distribution) than there is in let's say plumbing or some of the other analogies you make here.
The more democratized a field is and the more systematic efficiencies there are to be gained, the more easy it will be to both create and capture value and hence, resulting in a more even playing field for expected compensations. This has historically been true for entrepreneurship, modern-day programming is also a good example of this effect.