It is not a good time to be a JPMorgan Chase shareholder.

Investors in the goliath bank stand to lose $13 billion if JPMorgan signs off on a tentative deal with the government to resolve probes into the bank’s sale of bad mortgage securities.

These are not just multimillion-dollar hedge fund investors. They are also pension funds that manage the retirement savings of teachers, nurses and sanitation workers, and mutual funds, the vehicle most Americans use to play the stock market.

Every time the government extracts a hefty penalty from JPMorgan, which has happened a lot lately, shareholder money pays the fine. That model has long been a source of contention, with some arguing that regulators should penalize the individuals responsible for misconduct instead of the corporation.

Yet shareholder fortunes rise and fall on the deeds of banks. Money made from the sale of mortgage securities or risky investments is parsed out to investors when times are good. Shouldn’t they bear some pain when the house of cards comes crashing down?

“If profit is obtained through fraud, then it’s perfectly fair, indeed essential, that the profits be removed from the shareholders,” said William K. Black, a law professor at the University of Missouri at Kansas City and a former bank regulator. “They should have never received those profits.”

Black argues that even if shareholders made money from a company’s actions, officers of the company are still ultimately responsible and should be prosecuted and forced to pay damages. Companies, he added, should fire officers whose actions put the firm at risk and “claw back” their compensation.

In JPMorgan’s case, it’s debatable who bears responsibility for the bank’s legal morass. Federal and state prosecutors have accused the bank of defrauding investors, including government-controlled mortgage lenders Fannie Mae and Freddie Mac, by knowingly selling them securities made up of poorly underwritten home loans. In doing so, the bank violated the representations and warranties in the securitization agreements, authorities say.

JPMorgan claims that about 80 percent of the securities at the heart of the charges were produced by Bear Stearns and Washington Mutual before JPMorgan bought the companies in 2008. That still leaves JPMorgan on the hook for nearly a quarter of the securities sold to benefit its bottom line, and JPMorgan is legally responsible for the liabilities of the companies it purchased.

The Federal Reserve absorbed $29 billion of Bear Stearns’s mortgage securities to seal the deal with JPMorgan, which took the remaining $370 billion in assets. The bank paid $1.5 billion for Bear Stearns, which had a market value of more than $11 billion.

JPMorgan paid $1.9 billion for Washington Mutual, which had $40 billion in shareholder equity. The deal JPMorgan reached with the Federal Deposit Insurance Corp. when it bought Washington Mutual out of receivership, however, did not specify whether the buyer would be on the hook for breaches in securitization agreements.

The purchases of Bear Stearns and Washington Mutual, despite the legal headaches, have enriched JPMorgan and its shareholders. Those deals are credited for making JPMorgan the largest bank in the country. It earned a record $21.3 billion in net income on revenue of $97 billion in 2012.

Shareholders may still question why JPMorgan’s chief executive, Jamie Dimon, did not do more to shield the company from the liabilities of Bear Stearns and Washington Mutual. All of the government settlements JPMorgan has reached in recent months —$1 billion over the “London Whale” trading losses, $389 million for duping customers into buying unneeded credit card services, $410 million for alleged improper trading in the energy markets — could spur shareholders to push for change.

“When shareholders feel the pain, they have ousted the board, ousted the CEO,” said Anthony Sabino, a law professor at St. John’s University. “At Chase, they’re feeling the pain. But Dimon knew to shape up, and he has improved the company. If shareholders are not satisfied, they will jump on him and he’ll be gone.”

But judging by JPMorgan’s stock price, which has been holding steady around $52 a share amid the reports of the $13 billion government deal, shareholders still have confidence in the bank.