They say social networking sites are the best way to gauge how the world feels about something. So when Bank of America (NYSE: BAC) announced last week that it was going to begin charging $5 a month for most customers who use a debit card, I checked to see what Twitter had to say. No surprises:

"Bank of America is like a man who's been saved from a burning building and then kicks the fireman in the ----," said one customer.

"It's illegal to rob a Bank of America, but legal for Bank of America to rob you of 5 dollars every month for spending your own money," wrote another.

"$5 a month to use my OWN MONEY?"

"Loan to the rich, steal from the poor."

"Blood boiling."                                                                        

And so on.

The outrage is understandable. When something that used to be free suddenly costs money, you feel abused. When the charges come from a bank that gulped tens of billions of dollars in bailout money, you feel robbed.

But the anger is misguided. Bank of America isn't charging a new fee to rip you off, or to goose its profits. It's doing so in response to new regulatory changes in the debit card market. Someone is to blame for the new $5-a-month fee, but it's not Bank of America.

B of A is hardly alone here. SunTrust (NYSE: STI) recently announced a $5-a-month fee for debit card usage as well. Wells Fargo (NYSE: WFC) is testing a $3-a-month debit card fee. Ditto for JPMorgan Chase (NYSE: JPM). Citigroup (NYSE: C) just raised the monthly fee of its basic checking account by 25%. Even credit unions that are quick to advertise that they still offer free checking have reduced or eliminated rewards in recent months.

Why the changes, and why now?

As of Oct. 1, new regulations cap the amount banks can charge in so-called interchange fees. These fees are collected by payment processors Visa (NYSE: V) and MasterCard (NYSE: MA) every time you swipe your credit or debit card, and are borne by merchants.

Here's how it had worked. Say you spend $100 at the grocery store. Visa and MasterCard extract a few pennies in processing fees, and your bank receives a 1%-3% interchange fee for providing the cash. The grocer in this case nets about $97 in proceeds.

But with new rules that became law this weekend, interchange fees on debit transactions are now capped at $0.21 plus 0.05% of each transaction, down from an average of $0.44 per transaction.

Banks had relied on these interchange fees to cover the cost of checking accounts. And, yes, checking accounts do cost money to maintain; banks weren't offering a free service because they wanted to do something nice for you. People who complain that banks are now charging to access your own money are missing a key point: Banks are charging so they can cover the cost of letting you keep your money secure, and available in ATMs all across the country.

Being outraged at this is like being outraged that storage units charge money just to let you store your own stuff. The storage company has overhead, and so do banks. According to a report by Marsh & McLennan, it costs banks between $250 and $300 a year to maintain a checking account, and half of all checking accounts are unprofitable for banks, since they don't hold nearly enough cash to lend out and earn a significant net-interest profit. Now that interchange fees have been capped at half of previous averages, banks have to seek new ways to recoup costs. In come the monthly fees.

How much will banks need to recoup? One report by the Federal Reserve estimates interchange revenue will drop by between $33 billion and $39 billion over the next two years. It concluded: "To offset these lost revenues, banks and credit unions will increase fees to their retail customers." There's good precedent for this. Since Australia capped interchange fees in 2003, "costs for card users, such as annual and other fees, have increased," a report by the Government Accountability Office found.

The biggest irony: The whole point of the new interchange fee cap was to provide relief for businesses selling small-ticket items, like coffee and newspapers, which were getting crushed by interchange fees. But rather than reducing interchange fees on small-ticket transactions, the new rules sent them through the roof.

In the past, small-ticket transactions were charged an average of 1.55% plus $0.04 in interchange fees. According to Bloomberg, Visa and MasterCard are now going to seek the maximum $0.21 plus 0.05% on all transactions. That turns the fee structure on small-ticket items upside down. For a $2 transaction, the old rules generated a $0.07 interchange fee. Today, it will be $0.22. MasterCard responded tellingly: "As we have noted throughout this process, setting price caps will -- and has -- created distortions in the market."

No one's better off, everyone's upset. Behold the power of unintended consequences.