Older 747 have a design life of about 30-35,000 pressurization cycles, and I would have thought technology would have evolved since then.
Maybe the fuel efficiency improvements of newer aircraft just made this one no longer economically feasible as it approached a
D-check.
Often, older aircraft being phased out of a particular airline's fleet are either stored or scrapped upon reaching their next D check, due to the high costs involved in comparison to the aircraft's value.
Boeing 777: The Heavy Check follows each stage of a massive operation in which a Triple Seven is completely taken apart, inspected, and entirely refurbished. It’s an incredible surgical procedure that is carried out every 16 years of use and tens of thousands of flight hours, so the aircraft can remain at the cutting edge of technology, comfort and safety.
I don't think newer aircraft need to be that much more efficient for the economics to tip the balance over a lifetime. 20 years later, I would bet there have been improvements that are significant enough.
By the late 2000s, the 777 was facing increased potential competition from Airbus' planned A350 XWB and internally from proposed 787 variants, both airliners that promise fuel efficiency improvements. As a consequence, the 777-300ER received an engine and aerodynamics improvement package for reduced drag and weight