I mean with all the technical miracles NASA pulled off on that mission, they somehow managed to underestimate the longevity of the mission by 45x.
To be fair, 90 days was not, in fact, the estimated lifetime of the mission. It was the design specification of the mission. That is, each of the subsystems was designed with the specification "design a system that will operate for a minimum of 90 (Martian) days, even under worst-case conditions."
Think of it as a 90-day warranty-- after 90 days, it wasn't expected to be dead, it was just out of warranty.
(and note that since the engineering specification was validated by testing the subsystems to either three times design life, or testing to design life under three-sigma worst-case conditions, it would have been very difficult to design for 4000 days...)