DeGette showed how easy it was for a light set of keys to move the ignition out of the "run" position. That can cause the engine to stall and the driver to lose power steering and power brakes.
Since February, GM has recalled 2.6 million cars over the faulty switch. The automaker said new switches should be available starting April 7. Owners can ask dealers for a loaner car while waiting for the replacement part. Barra said GM has provided more than 13,000 loaner vehicles.
GM has said that in 2005 company engineers proposed solutions to the switch problem but that the automaker concluded that none represented "an acceptable business case."
"Documents provided by GM show that this unacceptable cost increase was only 57 cents," DeGette said.
In her prepared statement, Barra said she doesn't know "why it took years for a safety defect to be announced," but "we will find out."
In an exchange with Tim Rep. Murphy, R-Pa., chairman of the House Energy and Commerce Subcommittee on Oversight and Investigations, Barra acknowledged that the switch didn't meet the company's own specifications.
Murphy also read from an e-mail exchange between GM employees and those at Delphi, which made the switch. One said that the Cobalt is "blowing up in their face in regards to the car turning off."
Murphy asked why, if the problem was so big, GM didn't replace all of them in cars already on the road.
"Clearly there were a lot of things happening" at that time, Barra said.
Barra repeatedly said the answer to lawmakers' questions would be part of GM's internal investigation.
In his prepared remarks, David Friedman, head of the National Highway Traffic Safety Administration, pointed the finger at GM, saying the automaker had information last decade that could have led to a recall, but shared it only last month.
Rep. Fred Upton, R-Mich., chairman of the House Energy and Commerce Committee, said GM and government regulators got complaints about the switches 10 years ago, and GM submitted reports to the agency. Upton questioned why it took so long to recall the cars.
Committee member Rep. Henry Waxman, D-Calif., said that committee staff members found 133 warranty claims filed with GM over 10 years detailing customer complaints of sudden engine stalling when they drove over a bump or brushed keys with their knees.
The claims were filed between June 2003 and June 2012.
Waxman said that because GM didn't undertake a simple fix when it learned of the problem, "at least a dozen people have died in defective GM vehicles."
Some current GM car owners and relatives of those who died in crashes were also in Washington seeking answers. The group attended the hearing after holding a news conference demanding action against GM and stiffer legislation.
Durbin reported from Detroit. Associated Press writer Marcy Gordon in Washington contributed to this report.