You're making the false assumption that designing something that last at least 90 days, but ends up lasting 2000 days is more expensive than something intended to last at least 90, and at most 180.
Planned obsolescence of hardware operating on another planet can be hard, much harder than over-engineering it.
Consider the wheels on the rover as a simple example (Curiosity has had structural issues with those). Next time they can either just say spend an extra 10 kg of payload to make the metal thicker, and be assured that it's "definitely 90, or way more" and move on to the next task.
Or, they can consider them lasting beyond 180 a failure. Then they'll need tens of thousands or hundreds of thousands of hours of design and testing to ensure that various types of Martian terrain wear them out at just the right rate, and no more or no less.
Easier to just say "this isn't worth micro-optimizing", eat the fixed cost of the extra payload, and move on. There's going to be tens of thousands of components on the rover that are like that, e.g. try finding a camera sturdy enough to operate on Mars but just fragile enough to reliably fall apart in 180 days.
In aggregate that's why these rovers are exceeding their life span. If it's truly important that missions are extended for whatever reason that can just be decided as a matter of policy. Stop talking to the rover after 90 days, or hand it over to hobbyists.