If anyone, including governments, makes numerous investments in companies, some will not work out, some will be poor investments, some will even go bankrupt. If you do not believe me ask KKR, Cain Investments, or Blain Capital. After the fact, it is easy to say "How could we have been so stupid?" I think that is especially true when the investments deal with alternative energy.
Those who are so inclined should read about the number of elements that Edison tried before he found a filiment that had a fairly long life and did not start fires. Was he stupid for trying so many other filiments before he struck on the one that actually worked? They were all failures.
A123's products did not work; the products were not economically fesiable. However, that is the price you pay for progress and expermentation.
I suggest you look at all the investments that were made that ended up successful and understand that the percentage of successes far outweigh the failures.