The besieged Wall Street bank Goldman Sachs, which is fighting a $1bn (£650m) fraud prosecution, faced hours of attacks by angry lawmakers for putting its own profits before clients' interests as it dispensed complex mortgage-backed securities branded as "shitty" and as "crap pools" by its own traders.

In an unusually gruelling political examination of a single company, senior Goldman executives struggled to justify seemingly flawed deals struck at the height of the credit crunch. Dan Sparks, the head of the bank's mortgage unit, conceded: "We made a number of poor business decisions, especially in hindsight."

The hearing marked a first public appearance for London-based Goldman banker Fabrice Tourre, who masterminded a 2007 deal named Abacus that has been branded as fraudulent by the Securities and Exchange commission.

The Frenchman rebutted "unfounded attacks" on his character but admitted errors of judgement in a series of emails that joked about Goldman's creation of "Frankenstein" financial products. The emails to his girlfriend, made public over the weekend, had appeared to demean his work as "intellectual masturbation" and as production of "Frankenstein" products.

Since being sued by the SEC two weeks ago, Goldman has faced a deluge of public and political criticism over its apparent success in making profits from the financial crisis. One Democratic senator, Claire McCaskill, accused the bank's executives of creating derivatives "in the La-La Land of ledger entries", adding: "You had less oversight than a pit boss in Las Vegas."

The seven past and present Goldman executives appearing in Congress were greeted by protestors in prison uniform, bearing placards reading Stop looting America! and Shame. Goldman's chief executive, Lloyd Blankfein, at times struggled with the tone of hostility, assuring lawmakers that he had no better foresight of the US economy than others in the market: "I don't think we're that smart."

The SEC's prosecution of Goldman focuses on a single transaction in which the firm is charged with tricking clients into investing in a mortgage package known as a synthetic CDO that was filled with doomed home loans. Several similar transactions have since come to light.

One $300m package, named Anderson, was created in March 2007 from mortgages written by a defunct sub-prime specialist, New Century, and the financial product was downgraded from a triple-A rating to junk within seven months.

Another, a $1bn package called Timberwolf, was branded as a "shitty deal" in an internal email by Thomas Montag, then Goldman's head of sales and trading for the Americas. The chairman of the Senate committee, Carl Levin, repeated the phrase more than a dozen times, repeatedly demanding whether Goldman should be selling mortgages that it privately looked upon so poorly.

Asked about messages describing Goldman products in such terms, the bank's chief financial officer, David Viniar, drew gasps in the room by replying: "I think that's very unfortunate to have on email." Viniar quickly clarified his remarks to say he felt it was unfortunate for an employee to say in any form. But later, Goldman's chief executive struck a different note, insisting that the bank's true views on the fate of complex financial products was of little relevance to those buying them.

"The thing customers are buying is exposure," said Blankfein. "The thing they're buying gives them the risk they want. They're not coming to us because of what our views are."

At times, the chasm in outlook between Washington and Wall Street seemed impossible to bridge. Blankfein needed a pause to recollect that his annual bonus last year had been $9m. The former presidential candidate John McCain told him that the US public, still struggling with unemployment and foreclosures, was not impressed: "The idea that Wall Street has come out of this thing just fine, thank you, is something that really grates with people," he said.

It emerged that as many as 90% of the loans in certain mortgage packages securitised by Goldman had been written on a so-called "stated income" basis, meaning that homeowners were not required to offer any proof of their salaries on mortgage applications.

Tourre, who has been on paid leave from Goldman since being singled out in the SEC's prosecution, defended the complex products he had put together: "To the average person, the utility of these products may not be obvious. But they permit sophisticated institutions to customise the exposures they wish to take in order to better manage the credit and market risks of their investment holdings."

Goldman's difficulties have prompted a 17% fall in the bank's share price over the last two weeks. Analysts fear that if charges against the firm stand up, an erosion in reputation could lead to an exodus of customers. Even prior to the SEC's prosecution, Goldman had been pilloried for being a key counter-party in swaps that led to the collapse of the insurer AIG and for taking "short" positions in advance of the collapse in America's housing market.