Banks have a lot of ways to make money. One of the ways—which, despite its significance to their bottom line, will never be advertised, trumpeted on an earnings call or otherwise celebrated—is through customer error and misfortune.

Typically when customers overdraw their accounts, bounce a check or are unable to keep a sufficiently high balance, fees are charged. At some institutions these fees can stack up, so that accidentally overdrawing an account multiple times in one day will lead to multiple charges.

Other fees pertain to ordinary banking activity—ordering checks, receiving paper account statements, paying bills online and using ATMs. Sometimes these fees overlap, as in the case of low-balance and monthly maintenance fees.

The type and number of fees has proliferated to such an extent that checking accounts offered by 35 of the nation's largest banks and credit unions come with an average of 22 fees, according to a recent WalletHub report. On some accounts, the fees number as high as 40 or 50.

Banks have gotten away with this because "consumers don't really think to look at the fine print" when opening a checking account, said Jill Gonzalez, a WalletHub analyst. And most customers won't actually encounter all the fees, some of which are levied for less common services such as international wire transfers.

Even so, Gonzalez said, the situation is untenable— big traditional banks are going to have to trim some of their fees to remain competitive, or risk losing market share to digital rivals, credit unions and small banks. Instead of charging so many fees, some bankers say, they will have to cultivate long-term relationships with customers that make it possible to sell them more lucrative products and services down the line.

The online-only Ally Bank, a unit of Detroit-based Ally Financial, has built its business model on just such a thesis. When Ally first began offering consumer checking in 2010, it set out to be "obviously better," Chief Executive Diane Morais said. That meant addressing "huge customer pain points" on issues such as "lack of transparency, being nickel-and-dimed [and] confusing jargon — banker talk that was obfuscating what was really going on with these accounts."

In WalletHub's report, Ally is ranked second out of 35 institutions in affordability, and it is not hard to see why: The bank's standard checking account has only nine associated fees. Overdraft transfers from savings to checking accounts do not incur any fee, and overdrafts covered by the bank result in no more than one $25 charge per day, no matter how many times the account is overdrawn. Even incoming international wire transfers are free.

"Online-only banks tend to be more transparent when it comes to their fees," Gonzalez said. "Traditional banks are trying to catch up, trying to follow suit."

The overhead associated with a retail branch network makes that tough in an environment where net interest income is tight. In many cases "they need to be charging these fees to pay for their businesses," Gonzalez said.

Large traditional banks, when reached for comment, were reluctant to provide anything beyond the standard assurances that they have the customer's best interests at heart.

But not all brick-and-mortar institutions build so many fees into their checking accounts. Community banks, which have smaller retail footprints and therefore less overhead, tend to charge far fewer fees, said Rusty Cloutier, the president and CEO of Lafayette, La.-based MidSouth Bancorp. "I can't imagine what I could come up with 22 fees for," he said.

MidSouth's basic checking account comes with fewer than five fees, including a $32 charge for overdraft protection—an optional service—and an identical charge for insufficient funds. There is no low-balance fee.

The $1.9 billion-asset MidSouth and its peers are also less likely to take advantage of consumers because of their close ties, Cloutier said.

"Community banks are much more closely attached to the people they serve," he said. "It's much easier to be sitting in some megatropolis far off, imposing fees on customers you never see, versus a community bank where the customers are walking in the front door and you see them every day."

To be sure, MidSouth derives a lot of its noninterest income from service charges on deposit accounts—51.9% of the total came from this source in the first quarter of 2016. For instance, the bank levied $1,374 million in overdraft charges in the first three months of the year. While Cloutier acknowledged that such numbers are "not an anomaly," he explained the high percentage by pointing out that MidSouth has fewer fee-based business lines than many banks. What's more, he says, having 59 branches—a high number for a bank of its size—drives up the number of consumer accounts, and therefore of account charges.

Regulators and consumer advocates have pushed for banks to offer checking accounts with no overdraft fees, which are among the most common and potentially damaging for consumers. Minneapolis-based U.S. Bancorp, which WalletHub ranked 31st in affordability, near last place, launched a new, overdraft-free consumer account in late August, after the report came out.

A U.S. Bank representative said the bank had been working on the new account initiative for a long time and that its introduction had nothing to do with the WalletHub ranking.

But it remains unclear to what extent such accounts are being advertised or adopted—or even whether they are saving people money.

"We're seeing more and more accounts that are touting 'no overdraft fees.' That doesn't mean it has no fees," Gonzalez said. An overdraft-free account could still tack on insufficient-funds fees if a customer bounces a check, for instance.

And then, too, the lack of overdraft protection is a trade-off. Gonzalez said she couldn't think of any accounts she had seen that offered overdraft protection without overdraft fees.

Indeed, it is an open question whether big traditional banks will be able to match the consumer-friendly terms offered by online-only institutions. While the new U.S. Bank account offers online bill pay and mobile check deposit, it doesn't include checks—and it comes with a $4.95 monthly maintenance fee. Ally, by contrast, charges no monthly fee on consumer accounts.

Instead Ally treats its 1.1 million deposit customers, about a third of whom are millennials, as an investment.

In the bank's diverse customer base, "there are probably people who have our checking account, like my nephew, who is just starting out," Morais said. "He probably doesn't have very much money in it. He's probably using his debit card and may occasionally overdraft. We're probably not making money off of my nephew. But over time, we're investing in that relationship. He's going to need a credit card, he's going to need an auto loan. He will need other products and services. … If he's ready in five or 10 years for his first mortgage, and we've treated him really well, why wouldn't he consider Ally?"

MidSouth has only 28,600 deposit customers. Yet it's telling that Cloutier, like Morais, speaks about reducing the number of bank fees—and cultivating enduring customer relationships—in terms of right and wrong.

"I always believe in the long run you come out ahead by doing the right thing," he said. "I do believe that. I was raised that way—that if you don't do the right thing, it's going to come back to haunt you."

Subscribe Now

Access to authoritative analysis and perspective and our data-driven report series.

14-Day Free Trial

No credit card required. Complete access to articles, breaking news and industry data.