They planned for three 90 second flights prior to launch. After those worked they transitioned over to longer "operations demo" flights and those were extended tentatively out to 12 flights. After the 21st flight they just stopped manually allocating labor and funding to the project for a set number of flights and instead gave them a running budget for indefinite continued operations.
So while "strictly speaking" they planned for three 90 second flights. There was the unstated assumption that it'd be used for much more than that as long as it actually worked effectively.
It sounds as though mission life has as much to do with funding for ground staff (not something I ever considered) at least as much as it has to do with the life expectancy of deployed hardware.
Yep. For example, Spirit and Opportunity were part of the Mars Exploration Rovers mission. 2/3 of that mission's total cost was the development, manufacture, and launch of the rovers themselves. Which more or less "per unit" works to 1/3 of the total mission cost per rover. The other third of that mission cost was staffing for the (15 year) ongoing mission from when it passed the initial mission parameters to when opportunity finally was deemed dead in 2018.
So while "strictly speaking" they planned for three 90 second flights. There was the unstated assumption that it'd be used for much more than that as long as it actually worked effectively.