When learning the definite integral 'rigorously', most first courses seem to follow the steps below.
Sketch the function over $[a,b]$
Construct arbitrary left and right function value partitions, resulting in upper and lower bounds for the area under the curve.
Sum these partitions and take the limit as $\max{\mathcal{|P|}} \rightarrow 0$ where $|\mathcal{P}|$ is the largest partition in $[a,b]$.
Make the magical claim that this is 'defined' to be $\int_{a}^{b}f(x) \, dx$
I've never really thought about it much in the past but when thinking about it now, I feel rather unconvinced that this 'should' be the case. Taking an anti-derivative and summing infinitely small partitions seem completely unrelated, yet there is somehow this magical connection between them.
Why would we expect the limiting value of the Riemann sum to be the same as taking the anti-derivative and substituting in the left and right-most extrema of the domain of integration? What is the missing piece of the puzzle here?