The Chevrolet Cobalt, the car at the center of the General Motors recall crisis, was a losing bet from the start.

The automaker never really wanted to build the compact sedan, and it showed. Critics and car buyers alike reacted with little enthusiasm for the vehicle.

"They couldn't stop making them," said Kelley Blue Book analyst Karl Brauer, "but they stopped caring about doing a good job on them."

GM (GM) now admits it should have fixed a faulty ignition switch in the Cobalt and similar models a decade ago when it was first discovered. At least 13 deaths have been tied to the problem, which can shut off the cars when they're on the road.

But the models involved in the recall were built to solve two company-wide problems, rather than to meet consumer demand.

First, regulations required automakers to hit certain fuel economy averages across all the cars they sold. For overseas automakers with competitive, fuel efficient cars, that was no problem. Not so for Detroit automakers like GM and Ford Motor (F) that depended on sales of bigger, more profitable models like pickups and SUVs. For them, the compact cars were just something they had to sell, regardless of whether anyone wanted to buy them, much less if they could be sold profitably.

Related: GM - Steps to a recall nightmare

Another factor: A labor agreement with the United Auto Workers union that forced manufacturers to keep paying autoworkers whether they were on an assembly line or laid off. Such contracts made it expensive for carmakers to align production with demand. It made more sense financially to keep factories open and churning out the cheapest vehicles possible.

"The Cobalt wasn't designed to be the best compact car. It was done to make sure that GM met fuel economy standards and utilized manufacturing capacity that was already there," said Jesse Toprak, analyst with Cars.com.

So it's not that surprising that the Cobalt, and the versions of the car sold by GM's Pontiac and Saturn brands, weren't great cars. That's undoubtedly what GM CEO Mary Barra was referring to when she referenced the "cost culture" that governed what is now referred to as the old GM, prior to its 2009 bankruptcy, during Congressional hearings on the recall.

Related: The 57-cent part at the center of GM's recall crisis

Consumers responded accordingly. So in order to sell the 200,000 or so Cobalts that General Motors was building every year, it offered large cash incentives to buyers, and it sold them in bulk to rental car companies which bought them at rock-bottom prices.

By 2010, the Colbalt's last full year on the market, fleet buyers accounted for more than 42% of its sales, according to figures from GM. GM declined to comment further for this article.

The rental car companies kept the cars for a short period of time, typically less than a year, then dumped them onto the used car markets, where they were bought by buyers looking for cheap transportation in a relatively new car. That drove down prices on the new cars even more, exacerbating GM's growing financial problems.

"When you put heavy incentives to sell to retail customers, and sell them to rental companies, you damage your prices," said independent auto analyst Michelle Krebs. "That's something Honda and Toyota didn't have to do."

Related: GM sales unscathed by recall crisis

The Cobalts that were bought by actual consumers were concentrated in the parts of the country where there was little competition from Toyota's (TM) Corolla or Honda's (HMC) Civic.

"It might have done OK in the Midwest, but it'd be tough to find a Cobalt purchased retail in Los Angeles," Toprak said.

The good news is that GM has since figured out how to produce a competitive, small car. The Chevy Cruze, the car that replaced the Cobalt, is selling well around the world and in the U.S.

"The Cobalt was part of an evolutionary process," Krebs said, "that helped them get to the Cruze," she said.