If JPMorgan Chase is a scapegoat, it is an extremely well-paid scapegoat: The crisis-era mergers that are costing the bank a small fortune in fines probably have racked up an even bigger fortune in profits.

Many on Wall Street, including the Wall Street Journal editorial page, are in a fit of rage over the news that JPMorgan has struck a tentative deal to pay $13 billion to settle federal charges that it sold bad mortgage securities to Fannie Mae and Freddie Mac ahead of the crisis.

The source of the rage is the fact that most of these securities were sold by Bear Stearns and Washington Mutual, two banks that JPMorgan bought in 2008 to help calm the financial crisis.

It seems JPMorgan is being punished unfairly for its kind-hearted assistance to the U.S. government at its darkest hour. That should make JPMorgan and other massive banks far less likely to come to the rescue in the next financial crisis, in Wall Street's view.

“My only hope,” bank analyst Gerard Cassidy of RBC Capital Markets sobs on the Wall Street Journal's MoneyBeat blog, “is that the next time a large financial institution gets into trouble and the government calls a large bank CEO to help with a bail out that he chooses not to pick up the phone.”

But before we start playing the world's smallest violin for America's biggest bank (by assets), it is worth remembering that JPMorgan and its CEO, Jamie Dimon, knew the risks when they bought Bear Stearns and Washington Mutual. They took the good with the bad, and there will likely be a lot more good from those deals than bad.

When asked for comment on this story, JPMorgan spokesman Joseph Evangelisti pointed to Dimon's annual letters to shareholders in the past two years, saying "he gives plenty of detail on the pluses and minuses of the WaMu and Bear purchases." You can read them for yourself, but I didn't see all that much detail in them. The 2010 letter has a little bit more detail, but no tally of the pros and cons.

In each letter, Dimon brags that the bank absorbed Bear Stearns and Washington Mutual without hurting its capital levels. That is at least partly because JPMorgan bought both banks at fire-sale prices.

The bank bought Washington Mutual essentially for free, paying $1.9 billion for a bank that had $40 billion in shareholders' equity just before the deal, and then recording a $2 billion profit on it immediately, The New York Times' Peter Eavis noted last month.

For Bear Stearns, JPMorgan ultimately paid $10 a share for a bank that a year earlier was worth $170 a share. It also got the Fed to cover possible losses from about $30 billion in risky Bear Stearns assets.

Though the WSJ editorial page claims JPMorgan was rushed into these deals without any due diligence, Eavis points out that bank officials repeatedly claimed to understand the risks they were taking.

"We have known Bear Stearns for a long time," the bank's chief financial officer said in a conference call in 2008. About the Washington Mutual deal, Dimon said, "Our eyes are not closed on this one."

At the time of the deals, JPMorgan estimated that Bear Stearns and Washington Mutual combined would add about $3.5 billion to net income annually, Eavis notes. If correct, that would add up to about $16 billion in extra profit since 2008, trumping the $13 billion in fines.

Of course, this is a super-simplistic approach to measuring the value of these deals. Banks make bad predictions all the time, and it's possible that JPMorgan has not made $16 billion in profit from Bear Stearns and WaMu in the past five years.

On the other hand, it is also possible that JPMorgan has made a whole lot more than $16 billion from these deals. As Fortune's Cyrus Sanati pointed out last year -- in response to Dimon grousing about Bear Stearns' legal problems -- JPMorgan's net interest income alone soared by $6 billion in 2008, partially because of all of the good, non-toxic assets the bank picked up from Bear Stearns. (Remember, the Fed took most of the toxic stuff.) Bear Stearns was such an amazing deal for JPMorgan that it quickly raised its offering price to $10 a share from $2, rather than let rivals pick up the scattered pieces of Bear Stearns, Sanati notes.

In several earnings releases after the deals, JPMorgan waxed enthusiastic about the benefits of Bear Stearns' brokerage and WaMu's massive retail-banking business. And while the government might be punishing JPMorgan on the one hand, it has been using the other hand to dole out too-big-to-fail borrowing subsidies and cheap Fed loans.

Clearly JPMorgan shareholders aren't taking the $13 billion in fines too seriously. The bank's share price was unchanged on Monday, not far from an all-time high. "It's becoming increasingly clear that investors are beginning to look past the headlines," Sterne Agee analyst Todd Hagerman wrote in a research note.

So the next time the government rings up a big-bank CEO and asks if he wants some basically free money, along with a side order of minor legal headaches, that big-bank CEO would be a fool not to pick up the phone.

Also on HuffPost:

Loading Slideshow...
  • 11. Journalists

    Percentage of Americans that rate their honesty highly: 24 percent <a href="http://www.gallup.com/poll/159035/congress-retains-low-honesty-rating.aspx?utm_source=add_this&utm_medium=addthis.com&utm_campaign=sharing#.ULyYD1cRz8Y.twitter">Read more at Gallup</a>.

  • 10. Business Executives

    Percentage of Americans that rate their honesty highly: 21 percent <a href="http://www.gallup.com/poll/159035/congress-retains-low-honesty-rating.aspx?utm_source=add_this&utm_medium=addthis.com&utm_campaign=sharing#.ULyYD1cRz8Y.twitter">Read more at Gallup</a>.

  • 9. State Governors

    Percentage of Americans that rate their honesty highly: 20 percent <a href="http://www.gallup.com/poll/159035/congress-retains-low-honesty-rating.aspx?utm_source=add_this&utm_medium=addthis.com&utm_campaign=sharing#.ULyYD1cRz8Y.twitter">Read more at Gallup</a>.

  • 8. Lawyers

    Percentage of Americans that rate their honesty highly: 19 percent <a href="http://www.gallup.com/poll/159035/congress-retains-low-honesty-rating.aspx?utm_source=add_this&utm_medium=addthis.com&utm_campaign=sharing#.ULyYD1cRz8Y.twitter">Read more at Gallup</a>.

  • 7. Insurance Salespeople

    Percentage of Americans that rate their honesty highly: 15 percent <a href="http://www.gallup.com/poll/159035/congress-retains-low-honesty-rating.aspx?utm_source=add_this&utm_medium=addthis.com&utm_campaign=sharing#.ULyYD1cRz8Y.twitter">Read more at Gallup</a>.

  • 6. Senators

    Percentage of Americans that rate their honesty highly: 14 percent <a href="http://www.gallup.com/poll/159035/congress-retains-low-honesty-rating.aspx?utm_source=add_this&utm_medium=addthis.com&utm_campaign=sharing#.ULyYD1cRz8Y.twitter">Read more at Gallup</a>.

  • 5. HMO Managers

    Percentage of Americans that rate their honesty highly: 12 percent <a href="http://www.gallup.com/poll/159035/congress-retains-low-honesty-rating.aspx?utm_source=add_this&utm_medium=addthis.com&utm_campaign=sharing#.ULyYD1cRz8Y.twitter">Read more at Gallup</a>.

  • 4. Stockbrokers

    Percentage of Americans that rate their honesty highly: 11 percent <a href="http://www.gallup.com/poll/159035/congress-retains-low-honesty-rating.aspx?utm_source=add_this&utm_medium=addthis.com&utm_campaign=sharing#.ULyYD1cRz8Y.twitter">Read more at Gallup</a>.

  • 3. Advertising Practitioners

    Percentage of Americans that rate their honesty highly: 11 percent <a href="http://www.gallup.com/poll/159035/congress-retains-low-honesty-rating.aspx?utm_source=add_this&utm_medium=addthis.com&utm_campaign=sharing#.ULyYD1cRz8Y.twitter">Read more at Gallup</a>.

  • 2. Members Of Congress

    Percentage of Americans that rate their honesty highly: 10 percent <a href="http://www.gallup.com/poll/159035/congress-retains-low-honesty-rating.aspx?utm_source=add_this&utm_medium=addthis.com&utm_campaign=sharing#.ULyYD1cRz8Y.twitter">Read more at Gallup</a>.

  • 1. Car Salespeople

    Percentage of Americans that rate their honesty highly: 10 percent <a href="http://www.gallup.com/poll/159035/congress-retains-low-honesty-rating.aspx?utm_source=add_this&utm_medium=addthis.com&utm_campaign=sharing#.ULyYD1cRz8Y.twitter">Read more at Gallup</a>.