There are 2 main reasons why the MER is still operating long after it's 90 Sol planned lifetime.
The first is political, strategic, and can be summarized as 'Under promise, over deliver'. When a PI (principal investigator) proposes a high-risk scientific mission like this, they always frame the goals of the project such that their project is viewed successful even when things go wrong. If you say that your project lasted 11 years and then failed, that is one framing. If you say your project lasted 10 years longer than it was designed for, that is another framing of the same information that sounds much better. You can find many NASA projects where things went very wrong but the project was still viewed as successful.
The second reason is statistical. It is difficult to truly understand the details of the quality of the components a machine is built from, and the conditions of operation that a machine will operate in. We can never know exactly how long a machine will operate before failing. But we can use prior experience and statistical calculations to get a pretty good estimate of how long a population of similar machines will operate before failure. A machine like the MER is very complex, and we apply the statistical analysis to each individual part, and all the combinations of the parts. In the end, it is likely that the design engineers actually had 90 Sol of operation as their goal. They would also have had a measure of certainty associated with that. Perhaps it was a 90% chance that the MER would last 90 Sol. Or perhaps it was 99.9%. The higher the certainty required, the more 'over design' is needed to guarantee that.
You can research the term 'design life' to understand better these hardware related aspects.