I was evaluating the improper integral
$$I=\int_1^\infty \frac{1}{x^2}\,dx$$
and found $I = 1$.
But, I am confused now: the integral is an operation that sums all the values of the integrand function $f(x) = 1/x^2$ in the whole interval $x\in [1,\infty[$ .
If one calculates $f(1)= 1/1^2 = 1$, it turns out that this is the same value for the whole integral, but evaluated at only one point of the integration interval!
The function is $f(x) > 0$ in the whole integration range, so no cancelations between positive and negative values occur.
In short (no formal language): how a sum can be equal to just one term of the whole sum being that all terms are positive?
It's a coincidence. You're basically asking, "how can the area of a shape happen to be equal to its height at one end?"