The JPMorgan loss now plays into the bad image of banks. If the good image is of kindly bankers lending money to businesses that will grow and prosper, allocating capital in a way that will benefit all of us, the bad image is of a group of traders who will rig markets when they can and lie about them to customers if possible.

We have seen plenty of examples of that in recent years. When the auction-rate securities market began to disintegrate, some banks moved their selling efforts into high gear, so as to get the securities off their books and into the hands of gullible customers. The first enforcement action by the new Consumer Financial Protection Bureau concluded that Capital One had taken advantage of poor customers by persuading them to buy add-on credit card products that they could not use.

The invisible hand of the market has many benefits, but it sometimes needs to be restrained. “People of the same trade seldom meet together,” wrote Adam Smith, the patron saint of free markets, “even for merriment and diversion, but the conversation ends in a conspiracy against the public, or in some contrivance to raise prices.”

Market manipulation is at the heart of the Libor — London interbank offered rate — scandal. The idea that such a thing could happen seems not to have occurred to bank regulators for years, a reality that speaks volumes about their mind-set.

Libor rates are supposed to be the rates at which banks can borrow from one another without putting up collateral. We’ve more or less known for years that the banks posted fake rates during the financial crisis, when there was no interbank lending market to speak of, but that was taken as evidence of how bad the crisis was, not as an indication of improper behavior.

Thanks, however, to dogged investigation by a United States regulator, the Commodity Futures Trading Commission, the settlement with Barclays revealed that the rate rigging was going on long before the financial crisis began. The bank’s officials were not just trying to make their bank look better. They were trying to rig markets in their favor.

Moreover, most of the time they were not doing that to benefit the bank, by which I mean the institution that takes deposits and makes loans, as opposed to the part of the company that tries to make money trading securities. Barclays, like every other bank, makes many loans indexed to Libor. So if Libor rates were manipulated higher, the bank would collect more interest income and make more money. That would be illegal, but at least it would be helping the part of the bank that performs the socially desirable activity of lending.