In a delightful, short article on Economics and Morality, Timothy Taylor asks why economics has a reputation for leading to corruption:

Political science, history, psychology, sociology, and literature are often concerned with aggression, obsessiveness, selfishness, and cruelty, not to mention lust, sloth, greed, envy, pride, wrath, and gluttony. But no one seems to fear that students in these other disciplines are on the fast track to becoming sociopaths. Why is economics supposed to be so uniquely corrupting?

Arnold Kling gives one answer:

I think that economics is singled out for opprobrium because of the way that it challenges the intention heuristic. The intention heuristic says that if the intentions of an act are selfless and well-meaning, then the act is good. If the intentions are self-interested, then it is not good.

I would put the point more directly. Economics is detested because it doesn’t just study vice it shows that some vices have good consequences. The moral inversion of economic thinking begins early, in Mandeville’s scandalous and wicked book the Fable of the Bees, which aimed to show how private vices can lead to public benefits. Later, of course, Adam Smith would make a similar point in The Wealth of Nations with his metaphor of the invisible hand and his famous admonition that “It is not from the benevolence of the butcher, the brewer, or the baker, that we expect our dinner, but from their regard to their own interest.”

The private vice, public virtue theme is not limited to self-interest and microeconomics. Keynes was an admirer of Mandeville as an early discover of the paradox of thrift. Namely, that in some situations the virtuous behavior of saving can lead to public ruin and the vice of consumption can lead to riches. Paul Krugman continues to make this point today with his admonition that economics is not a morality play. Krugman offends traditional morality when he writes:

As I’ve said repeatedly, this is a situation in which virtue becomes vice and prudence is folly; what we need above all is for someone to spend more, even if the spending isn’t particularly wise.

Economists understand composition fallacies: a sum of light feathers is not necessarily light, a sum of bad actions isn’t necessarily bad and a sum of good actions isn’t necessarily good.

It’s no surprise that Hayek was another fan of Mandeville and also an opponent of traditional morality (also here) because Hayek recognized that nominally bad actions and beliefs can lead to good outcomes (“spontaneous order”) and that nominally good actions and beliefs can lead to bad outcomes (“the atavism of social justice”).

Even more recently we see Tim Geithner making the argument against morality:

“…in a panic, to rescue people from the risk of mass unemployment, you’re going to be doing things that look like you’re helping the arsonists…”

Standard morality, as Kling argues, often stops at intentions while economists are interested in consequences. Consequentialist philosophers also look at consequences but economists have the tools to trace interactions as they sort themselves into an equilibrium. Equilibrium outcomes may be very far from intentions. As a result, we find that economists often places themselves and their discipline in opposition to standard morality.