The question isn’t whether it’s
necessary; it’s whether it violates your assertion that it should be
optimal.
Again, the question isn’t whether another possibility
exists; it’s whether that possibility is
optimal.
Your question is phrased in a particular way that asks us to look at the big picture. However, it then demands that we ignore the big picture and look at individual states. In terms of mathematics, your question asks about the ‘area under a curve’, but then demands that we consider local maxima and minima.
If the function is monotonically decreasing, or if it crosses the y=0 line, then your demand is logical: local minima and maxima
do affect the value of the area under the curve.
However, if the function value goes to infinity (i.e., the limit of f(x) as x goes to infinity → infinity), then local minima and maxima do not affect the value of the area under the curve.
From a mathematical perspective, the answer to your question is “no” – the ‘negative experience’ does not make for a lesser value in terms of the ‘function’ that you apply to life.
However, (and I think that this is the second time I’m mentioning this to you – I can’t recall, offhand, if it was this thread or another that I mentioned this), if your perspective is atheism, then you have a point. If all you can see is an x-axis that extends to a distinct, finite point and then ends, then yeah – you’re going to conclude that, since there’s a finite endpoint to your line, there’s a distinct maximum value you can attain, and any little experience that doesn’t maximize your life experiences vis-a-vis your ‘value function’ is going to be perceived as hindering the ultimate value of your ‘value function’.
In other words, from the atheist’s viewpoint, anything that doesn’t maximize personal pleasure is ‘bad’; anything that increases personal pleasure is unassailably ‘good’. It’s a viewpoint that’s antithetical to Christianity.
Notice that this analysis is one that’s bounded by human, physical existence, and does not take into consideration eternity. That’s why you’re perceiving things in the way that you do. Can you see this?
They taught you what is necessary to succeed. They reinforced your desire to succeed. And, perhaps, they made success taste that much sweeter.