It's kind of interesting.
One of the big reasons that they thought it would be limited to 90 days is that the solar panels get covered in dust, and as that happens the amount of energy collected diminishes. They figured in about 90 days, based on previous missions to Mars, they'd be out of juice.
And...for the first 50 days or so, it was going that way. And then, a whirlwind came by, and scrubbed the rover clean. This has happened many many times since. An unexpected good fortune.