Wells Fargo is in hot water. U.S. regulators announced Thursday that the bank has to pay $2.5 million in customer refunds and $185 million in legal fees. It's comeuppance for some truly breathtaking stupidity on the bank's part.

The problem began with what's called "cross-selling." Your average big corporation has a lot of customers, but also a lot of different products and services. Wells Fargo, for instance, is one of the biggest banks in the country, and its offerings run the gamut from credit and debit cards, to online banking, to savings and checking accounts and more. Usually, most of a company's customers only use one or two of those products and services. But since it's already gone to the trouble to acquire those customers, it presumably behooves Wells Fargo and other big firms to get their employees to hawk the rest of their products and services to those customers as well.

That's cross-selling. Which seems straightforward enough. But it turns out, as a business model, cross-selling can be tricky. Doing it properly requires the right strategy, metrics, and so forth. Wells Fargo did not do cross-selling properly.

First off, the bank used a crude metric — simply the average number of products sold to each customer. Then it imposed strict cross-selling quotas on employees that arguably went way beyond what was reasonably possible.

Next, as the L.A. Times' E. Scott Reckard found in 2013, Wells Fargo reportedly treated its employees horribly. "Managers constantly hound, berate, demean, and threaten employees to meet these unreachable quotas," said a Los Angeles city attorney investigation sparked by the Times' report. Managers themselves were reportedly berated in front of coworkers if they fell short. Plenty of people put in extra hours, and then had to sue Wells Fargo when they weren't paid overtime.

"When I worked at Wells Fargo, I faced the threat of being fired if I didn’t meet their unreasonable sales quotes every day," one former employee said in a statement. "We were constantly told we would end up working for McDonald's" revealed another.

This was all going on since at least 2011. And Slate's Helaine Olen reported that, while Wells Fargo was unusually aggressive, banks in general got really serious about cross-selling after 2008. It's worth noting that the jobs market hasn't exactly been amazing over that period, so the bank's employees had good reason to fear falling into unemployment if they didn't hit their marks.

Predictably, under this sort of pressure, those employees wound up boosting their numbers by illegally enrolling thousands of Wells Fargo customers in all sorts of new accounts without their permission. One-and-a-half million unauthorized deposit accounts were opened, as well as 565,000 unauthorized credit cards. Debit cards were opened and new PIN numbers created. Employees created fake email addresses, forged signatures, and more.

A lot of those products and services were free. But sometimes, they came with fees, or the employees transferred funds from the customers' pre-existing accounts to start the new accounts, creating overdraft charges. Eighty-five thousand of the unauthorized deposit accounts racked up $2 million in total fees, and 14,000 of the unauthorized credit cards racked up over $403,000.

In at least one instance, a Wells Fargo customer lost $250,000. In another, a homeless woman had six accounts opened in her name, with total fees of $39 a month.

When customers complained, Wells Fargo managers blamed computer glitches. When they tried to sue, the bank invoked arbitration clauses in customer contracts to get the cases dismissed.

And it gets better. Bloomberg's Matt Levine did the math, and the income generated for Wells Fargo by all this amounted to $1.14 per fake account, or $450 per employee. So simply sacking and replacing the offending employees will likely cost Wells Fargo more than they got from all this business. And that's before you tack on the $100 million fine the bank has to pay the Consumer Financial Protection Bureau (the largest penalty the agency has ever leveled), the $50 million fine to the L.A. city attorney, the $35 million fine to the Office of the Comptroller of the Currency, and the $2.5 million in customer refunds.

Rather than some clever-but-evil profit-making gambit, "this looks more like a vast uprising of low-paid and ill-treated Wells Fargo employees against their bosses," Levine observed.

You could assume Wells Fargo's corporate leadership was just being stupid and ignorant. But no one being responsible for this is arguably just as scary as the top brass being guilty. That parts of Wells Fargo could engage in predatory behavior on this scale on their own is an indictment of the American economic order. At minimum, policymakers might want to rethink the corporate gigantism they've encouraged and allowed to fester over the last few decades.

But the L.A. city attorney also concluded that "Wells Fargo knew, or in the exercise of reasonable care should have known, that its employees open unauthorized accounts." It's technically possible to hold the powerful criminally accountable for negligence. (Though some in Congress are trying to change that.) But unfortunately, this is exactly the sort of situation where they tend to skate. America is comfortable throwing poor youths in jail for years for stealing groceries. But we get skittish about punishing rich businesspeople when their leadership encourages harm.

“We regret and take responsibility for any instances where customers may have received a product that they did not request,” Wells Fargo said in its statement. But it was the bank's workers who paid the price for trying to keep their jobs: Wells Fargo fired 5,300 employees over the shenanigans, or about 1 percent of its workforce.

"As far as we know," Olen observed, "none of those fired employees come from the C-suite."