From the company's perspective, whatever an individual put into their experience is almost completely inconsequential if they are doing their job. In a healthy, functional market, pay isn't about "fairness", it's about bottom-line results, and programmers and engineers make the products and services these companies use to generate revenue which in turn creates demand and subsequently the available funds for legal counsel!
I don't think that's how capitalism works. Your pay doesn't scale with your value, otherwise teachers and firefighters would be making bank. It's completely guided by supply and demand.
EDIT: Let's consider that "supply and demand" has artificially increased the price of programmers above their value. It's now a losing proposition for a company to continue to employ a programmer as the company is losing money, so the demand goes down and with it the price.
Conversely let's consider that the price of a programmer is artificially lower than his value. Any new company can come along and pay a bit more (but still less than actual value, for now!) and attract the best programming talent. Other companies must keep up in order to keep the talent, so the price returns to the actual value to the company.
Uh, no, that is not how supply and demand works. See <http://en.wikipedia.org/wiki/Economic_surplus>.
The gap between what people are willing to pay vs. what people are willing to sell for is often substantial. People spend a lot of time fighting over the distribution of the value in that gap between consumers and producers (see, e.g., price discrimination).
Replace x with "fair salaries" and "y" with "Tech companies making non-poaching agreements"
The CEO is essentially the face of the company when things happen (good or bad) and has huge responsibilities. Managing a company is easy from the armchair.
As far as lawyers are concerned, their wages just reflect the fact that they (should) have been trained as A-list negotiators, and it is common practice for lawyers to have a fee based on a percentage of the deal they negotiated.
There is a corollary for programmers for the above: start-ups. Though not trained negotiators, skill and work ethic can get you far enough. And it is common practice to receive a percentage of the reward.
The grass always looks greener on the other side.
Not in California.
So, you _do_ need to 'attend' law school, even if it's over the internet. (Unless you "study in a law office or judge’s chambers", which I guess is a type of apprenticeship.)
Though there are successful independent lawyers. And an awful lot of unsuccessful ones.
Despite the expense of law school, there are about 25-35k jobs per year for 40-45k graduates per year. And maybe 5k per year of those pay the kind of salaries people think lawyers make. What keeps supply limited in law is that the growth of supply is gated by the amount of legal work in the economy. Law is unlike engineering in that nobody wants to hire fresh grads. They want the seasoned veterans who have been to trials or handled a big deal. Preferably a bunch of them. There is only so much of that work to go around, which bottlenecks the supply pipeline in the stage between fresh graduate to employable lawyer.
The moral of the story is that economic systems are more complicated than simple neoclassical tropes admit.
"There is no economic law that says that lawyers should make more money than programmers because they choose to be ripped off in pursuit of their training."
You don't NEED a degree to do programing. Arguably a computer science degree is standard but even then, you don't need 7 years of schooling. In order to be a lawyer, you need to complete law school.
At the end of the day, it's fair for a lawyer to charge more. Why? Because someone is willing to pay the premium.