One of the characters in the classic 1939 film “Stagecoach” is a banker named Gatewood who lectures his captive audience on the evils of big government, especially bank regulation — “As if we bankers don’t know how to run our own banks!” he exclaims. As the film progresses, we learn that Gatewood is in fact skipping town with a satchel full of embezzled cash.

As far as we know, Jamie Dimon, the chairman and C.E.O. of JPMorgan Chase, isn’t planning anything similar. He has, however, been fond of giving Gatewood-like speeches about how he and his colleagues know what they’re doing, and don’t need the government looking over their shoulders. So there’s a large heap of poetic justice — and a major policy lesson — in JPMorgan’s shock announcement that it somehow managed to lose $2 billion in a failed bit of financial wheeling-dealing.

Just to be clear, businessmen are human — although the lords of finance have a tendency to forget that — and they make money-losing mistakes all the time. That in itself is no reason for the government to get involved. But banks are special, because the risks they take are borne, in large part, by taxpayers and the economy as a whole. And what JPMorgan has just demonstrated is that even supposedly smart bankers must be sharply limited in the kinds of risk they’re allowed to take on.

Why, exactly, are banks special? Because history tells us that banking is and always has been subject to occasional destructive “panics,” which can wreak havoc with the economy as a whole. Current right-wing mythology has it that bad banking is always the result of government intervention, whether from the Federal Reserve or meddling liberals in Congress. In fact, however, Gilded Age America — a land with minimal government and no Fed — was subject to panics roughly once every six years. And some of these panics inflicted major economic losses.