Those former UA 777's Were Leased airframes that the owners wanted Back or United deciced the Lease rates were too high to keep. During Bankruptcy. United had a habit of buying airplanes and selling them to lease them back as off the books assets until the airplane was fully amortized then Buying the airplanes back prior to parking them for Sale or parting out. Some Lessors have played the game in taking their aircraft back to try and get better lease rates and many times it worked. But many times it Didn't. Ikown of a few Airplanes that sat in the desert for a couple of years before they were returned to service. I know of a few airplanes that were parked and kept under United's operating certificate to make them easier and less expensive to transition to another Airline's operating certificate.
Chapter 11 treats commercial aircraft (and engines) differently to most other leased items.
A great deal depends on the structure of the lease, and especially how taxation issues are addressed. Sometimes leasors want aircraft back, not because they don't want to continue to lease to the leasee, or even negotiate a new lease with the leasee, but because taking this course, will unwind the tax effective component of the original lease.
Buying aircraft, then executing a sale/leaseback is a robust transaction, if documented correctly. But at end of lease, re-purchasing, can trigger tax issues. One reason aircraft ownership involves so many legal entities, is to minimise the risk of tax clawback.
Chapter 11 was a trigger for aircraft financing, and especially the leasing industry to consolidate. Gone were the days where an operator could name an aircraft after a small town, and expect to empty it of savings to purchase a 737 or DC9.
Also, bankruptcy was a dirty word, and amazingly, many lease contracts made no reference to such an eventuality. Very different now.
But the biggest change, has been for the very largest airlines to create their own lease templates, fine-tuned with leasors, while leasing companies have their own templates for smaller and mid-size leasees. These practices have been followed more recently by the aircraft and engine OEM's.