First, there are a lot of lawyers engaged directly in public service. Lawyers work at non-profits, as public defenders, and for the government. A number of my friends (say 1 in 10) from law school had the grades to make $150k+ at a large law firm and didn't even apply to such jobs, instead taking $45k/year jobs as public defenders. While DOJ is often used as a political tool, the rank-and-file there are true believers, mostly top graduates from top schools who could make twice as much in the private sector. Now, to be perfectly fair the large majority of lawyers do work in the private sector, but even there public service is institutionalized in a way it isn't in other professions. The majority of lawyers at any large law firm do at least some pro bono work. Last year, attorneys at my big Wall Street law firm did on average over two working weeks worth of pro bono. Nearly all law firms count at least a week or two of pro bono towards yearly hours requirements. Nowhere near 10% of my engineering friends went to go work at non-profits for low pay, and I know very few engineers that donate that much work for free.

Second, law has lagged the rest of corporate America culturally. Over the last 50 years, corporate America has replaced independent ethical principles with the "ethics of the market." The business culture has internalized the idea that the purpose of corporations is to maximize profit for their shareholders to the point here people genuinely believe that anything legal that maximizes profit is not only good business but rather morally righteous. The legal profession is one of the last places where people use the word "fairness" without it being the punchline to some joke about things that are only relevant in grade school. Obviously you see more of this in the judiciary or among public service lawyers than at big Wall Street firms, but even lawyers defending big evil corporations have a constitutional discomfort with bending the rules too much--after all without rules a lawyer's life would be without meaning.

Third, law is as a profession very self-conscious about it's special role in the economy. Lawyer's attitudes towards their ethical codes are more similar to that of accountants than say that of financial service professionals. Part of this is the constitutional preoccupation with rules, but the other part is basic self-interest. In the financial sector, there are little to no consequences, other than some bad press, for selling a client on a bad deal while taking the other side yourself. In the legal sector, breaches of ethical duties to clients trigger the professional death penalty (disbarment). People have this image of scummy lawyers lying and cheating to benefit their clients, but very few lawyers like their clients enough to risk their own livelihoods on their behalf. Every single admitted lawyer went through an invasive "character and fitness" investigation before the state licensing boards, an investigation so thorough it digs into sealed juvenile records and verifies the consistency of facts on your law school applications. I was quite shocked at how much more seriously my classmates in law school took the Honor Code than my classmates in engineering school... Now, you certainly do see lawyers lobby for laws that create more work for them, but it's kindergarten stuff compared to businesses that lobby to be allowed to externalize more of the costs of their activity onto workers in the form of workplace hazards, or banks that lobby to be allowed to take more risks with their depositors' money. When I was working as an engineer in the defense industry, it wasn't like we scrupulously avoided opportunities to make ourselves relevant ("now that you've invaded Iraq, you might want to look at our product...")

Now, I don't want to oversell my case. There are a lot of scummy lawyers, especially of the personal injury kind. And most lawyers who make a good living do it by defending big evil corporations. But you know what? There are lots of scummy people everywhere and everyone works for those big evil corporations anyway. And unlike lawyers those people don't swear to follow an ethical code that makes it a punishable ethical violation to not rat out your friends.