The pilots didn't get a better deal because they rejected their TA, we all benefitted from the merger as the ask went from 20% to 17% because if the higher value it created for the airline and therefore needed to cut less. The change to the eventual 17% also included the groups that have ratified deals deal under the original 20%.
However, Judge Lane did allow AMR to abrogate the APA contract. They didn't do that as the APA agreed to most of the original ask and also ended up with the 17% all other groups had.
"U.S. Bankruptcy Judge Sean Lane ruled Tuesday that American Airlines can abrogate its collective bargaining agreement with the Allied Pilots Association. The judge rejected the APA’s arguments that American hadn’t made its case that it needed to toss out the contract to proceed with its bankruptcy reorganization. Section 1113 of the federal bankruptcy code allows companies to throw out its collective bargaining agreements if it meets a number of requirements. The judge ruled that American had met those requirements." --Dallas News, Sep 2012.