JPL expected three months, hoped for a little over six months, the got a bigger bang for their buck than they expected. See, the program cost around $780 million, I think, at the time they were lauched, but they didn't do, "cheaper, quicker, faster", they did it right, dual rovers, in case one failed, put in lots of technology that allowed them to utilized the tech a decade past the launch date even though they never expected them to last that long, even in their wildest dreams.