What is clear is that the Federal Government had no authority to fire the guy; that is the business of the board of directors and the stock holders.
If GM had been taken over by another company rather than the government, that other company would have had every right to ask GM corporate officers to resign as they saw fit. GM had to go along with some government management decisions as a condition of receiving government help. GM could have decided to proceed into bankruptcy without the government.
Rick Wagoner walked away with $20 million from a bankrupt company so we don't need to feel too sorry for him.