Didn’t the FEDs intervene in that bankruptcy to tilt the playing field against the bondholders in ways that are not normal under bankruptcy laws? IIRC, that’s what happened.
Virtually all large Chapter 11 cases need a DIP ("debtor in possession") lender or the company cannot operate long enough to be reorganized. Often, the DIP lender is the senior secured lender seeking to preserve the value of its collateral. One of the benefits of being the DIP lender is that you get first priority in payment in any reorganization plan or liquidation. In GM, the federal government was the DIP lender, because no one else would do it.
In a Chapter 11, each different class of creditors votes to accept or reject the plan of reorganization, which spells out who gets what. If a class of creditors votes to reject, then they can be "crammed down," which means that if they are getting at least as much as they would in a liquidation, then they are forced by law to accept that.
The GM plan gave no recovery to the bonds, but gave recovery to employee pension fund claims that were junior. The bondholders of course objected, but they were crammed down. Why? Because in a liquidation, all of the value would go to the DIP lender first, the costs of administration (i.e. the lawyers), the secured creditors, and then unsecured creditors (like bondholders) in order of their seniority. And in GM, there was insufficient value in the estate to pay anyone but the DIP lender, the costs of administration and the senior secured creditors.
The specific twist in the GM case is that the DIP lender (i.e. - the US government)
voluntarily redirected part of its recovery under the reorganization plan to a class lower down the priority ladder (the pension fund). That is colloquially known as a "bypass" and is permitted under the Bankruptcy Code and case law. Of course, in most cases the DIP lender is not going to surrender some of its recovery to a lower priority class.
The bondholders fought long and hard but they lost in the end. It is important to note that the old GM stockholders got nothing, just like the bonds. I would also note that the bypass technique has been used in cases not involving the US government.
PS - it was long ago and I am going on memory for this. I haven't gone back to research it.