But, GM asked for the Federal government's help. They (GM) came came to Uncle Sam with their hands extended, looking for a handout. Did you really expect the government to just give away money with no strings attached?
Their intent was to purchase equity in GM, bring the company back to full strength and then sell that equity. It's no different than any stock broker. They intended to buy low and sell high. But somehow because it's the government doing it, it's wrong? GM asked for this, they had a choice and they made it.