The good judge smelled a rat.

“Was there some sort of ghost that performed these actions?” New York federal Judge Jed S. Rakoff demanded to know Monday in rejecting a deal that would let Bank of America off the hook in yet another banker bonus scandal. The Securities and Exchange Commission had charged the bank with covering up for outrageous bonuses given out at Merrill Lynch as the bank acquired the failed stockbrokerage, and now it was letting the bank off the hook with a chicken-feed fine.

“Do Wall Street people expect to be paid large bonuses in years when their company lost $27 billion?” the judge asked, and Lewis J. Liman, the lawyer for Bank of America, assured him they do: “My God! Bonuses on Wall Street? It is not a matter of surprise.”

But for those of us less sophisticated in the ways of Wall Street, it is a surprise that Merrill Lynch executives were rewarded for failure at the same time Bank of America was using $45 billion in taxpayer funds to take over the brokerage house. Six hundred ninety-six executives who helped run Merrill into the ground were granted more than a million bucks each.

BofA lawyer Liman attempted to put an egalitarian spin on this government-sponsored welfare for the superrich by pointing out that all told, another 39,000 Merrill employees averaged only $91,000 in bonuses, but the judge wasn’t having it: “I’m glad you think that $91,000 is not a lot of money; I wish the average American was making $91,000.”

That’s the point; the average American is paying for the banking debacle not only in taxes for the bailout but with lost jobs and homes. Yet the SEC, which is supposed to be protecting the ordinary citizen’s interests, decided to give BofA execs a bye. The question is why Bank of America and Merrill failed to inform their shareholders that such payoffs were part of the deal. The details of the bonuses were known to BofA CEO Kenneth Lewis and other top bank executives but not mentioned in the merger agreement or proxy statements sent to the company’s shareholders for approval.

The SEC complaint did accuse BofA of misleading its shareholders, but instead of digging deeply into how such decisions had been made and by whom, a deal was concocted in which BofA got off with a paltry $33 million fine. That is less than the bonus received by one of the Merrill execs. Yet the SEC deal would have closed the case on how that decision was made.

“You filed a rather uninformative, bare-bones complaint,” Judge Rakoff told SEC lawyer David Rosenfeld, who lamely defended the decision to avoid going after the bankers involved, and it is instructive of whose interest he was serving that “[t]he lawyer for Bank of America periodically whispered what appeared to be suggestions to Mr. Rosenfeld,” as a New York Times article put it.

Whispering between government regulators and the Wall Street honchos ostensibly being regulated is what got us into this mess in the first place. The SEC looked the other way as the banking bandits piled on hundreds of billions in toxic holdings, and its lawyers evidently still do not get the message that they are not supposed to be facilitators of financial rip-offs.

Thankfully, at least one judge had the courage to challenge the rules of the game and at least delay its predictable outcome. “I would be less than candid if I didn’t express my continued misgivings about this settlement at this stage,” Rakoff said. “When this settlement first came to me, it seemed to be lacking, for lack of a better word, transparency. I did not know much about the facts from the complaint, I did not know much, or really anything, about the basis of the settlement.” He said that accepting the settlement “would leave uncertain the truth of the very serious allegations made” by the SEC and whether any of the bonus money was “derived directly or indirectly from the $20 billion” that BofA received from the government.

That is the only error the judge made; the figure is actually $45 billion in government bailout funds for BofA and $118 billion more in public money to guarantee its toxic assets. Given that enormous investment of taxpayer funds, and the trillions more put at risk because of the folly of those richly rewarded banking bonus babies, transparency would indeed seem to be required as the order of the day. As Judge Rakoff concluded, Bank of America and Merrill Lynch had not only “effectively lied to their shareholders” but the money to finance their bonus scam had come “from Uncle Sam.”

Why has it been left to one stellar judge to sound the alarm, and why is Congress and the Obama administration looking the other way?