GM repaid everything it was obligated to pay under the terms of the bailout loans. It was the US treasury that soaked the taxpayers by buying GM stock...on which they (or, we the taxpayers) took an $11B hit, ultimately. The treasury sold the stock at a big loss. That's not GM's fault.
By 2014 GM had become one of the 40 most profitable corporations in the country. Then they had the massive ignition switch recall that pretty much wiped out all their earnings.
All of the big 3 took LOTS of government money. To say Ford is any better than the others based on GM and Chrysler taking government loans is disingenuous.
Regardless of how it came about, GM benefited from yet more government money (confiscated from citizens) to aid the company, but probably more so, it aided the unions. The stock purchases by the government was just another way to help a big constituent to the Democratic Party.