NEW YORK ( TheStreet) -- When is $33 billion a bargain? When you're a lawyer for Bank of America ( BAC - Get Report) trying to put a lid on mortgage-related legal costs related to Countrywide.

Actually, that $33 billion figure is almost certainly light, but more on that later. Before we get into all the whys and wherefores, let's take a moment to celebrate the people who make America great: our lawyers, of course!

Bank of America shares gained more than 5% Monday on pure lawyer power, as it reached a deal with insurer MBIA ( MBI) over mortgage-related disputes and somehow convinced attorneys general of New York and Delaware to drop their opposition to an $8.5 billion pennies-on-the-dollar mortgage settlement they reached in 2011. That 5% gain means about $7 billion added to the bank's market cap. Kudos to the bank's lawyers, starting with lawyer-CEO Brian Moynihan!

America may have been created by people who took risks: adventurers, entrepreneurs, inventors, pioneers, revolutionaries, robber barons and cold-blooded killers. But the time for that kind of heroism is past. Nowadays, you can never be too careful. Making something new is either a lawsuit waiting to happen, or far too costly to contemplate. Far safer to copy from someone else. Before you do that, however, you'll need to hire some lawyers to make sure you don't get sued for patent infringement.

And before you try and sell your product, you'll want to be sure anyone who uses it signs away every right they ever thought they might have or contemplated having. More lawyers!

Just think of how many lawyers it must have taken Bank of America to buy Countrywide Financial -- a deal that will go down as one of the biggest value destroyers in history. And you think they didn't use lawyers to scrutinize every aspect of the mortgage-backed securities they created -- er, copied from another bank -- before they sold them?

But that wasn't enough, as it turns out. A crisis came along, and every crisis has victims, and every victim has a lawyer, and suddenly Bank of America needed even more lawyers. That's when they appointed a lawyer, Brian Moynihan, to run the whole company.

"It's day-to-day, hand-to-hand combat," Moynihan said in 2011 about the bank's mortgage-related legal battles.

Moynihan didn't mean that literally, of course. Like any good lawyer, he's an incredibly dull person, but even dull lawyer CEOs occasionally slip up and give lively quotes.

But it was Moynihan's dullness that proved to be his greatest asset, as Bank of America waited out its legal opponents until they either became desperate for a deal, as cash-strapped MBIA appears to have been, or bored to death, as the attorneys general apparently were.

Moynihan couldn't delay and bore everyone to sleep on his own, of course. One important hire he made was Gary Lynch , a former Securities and Exchange Commission enforcement chief who has done a bang up job of trading on his early years of modest government pay and parlaying it into millions in the private sector.

Moynihan, Lynch and the other Bank of America lawyers appear to have the wind at their briefcases now as they try to wrap up the remainder of the bank's mortgage mess. The $33 billion figure, by the way, came from FBR Capital Markets, when I asked their analysts about Bank of America's costs tied to something known as "putbacks" or "reps and warrants." This refers to claims brought by buyers of mortgage backed securities who have argued the mortgages contained in those securities were fraudulent or otherwise didn't live up to the terms originally promised. That was, and still remains, potentially the most costly mortgage-related issue for Bank of America, though there are also billions in expenses tied to improper foreclosures.

I asked another analyst on Tuesday about Bank of America's total mortgage-related legal costs, and he admitted he didn't know -- a clear sign that the bank's strategy of boring and distracting everyone has finally paid off. I sent an email to Bank of America spokesmen Lawrence Di Rita and Lawrence Grayson asking about the mortgage costs and -- true to form -- they didn't respond.

Notice how similar the name Lawrence is to the word lawyer? Probably just a coincidence, but their lawyerly instincts are good nonetheless. Why put a figure out there when they don't have to? They'd only be giving ammunition to the next person looking to sue the bank over something.

-- Written by Dan Freed in New York.

Disclosure: TheStreet's editorial policy prohibits staff editors, reporters and analysts from holding positions in any individual stocks.