Because integration reverses the process of differentiation. The derivative of x^2 is 2x, and the integral of 2x is x^2 [+ C]. It’s the “anti” derivative. They may be used in different situations, but they are two sides of the same coin and come from the same root concepts.
A bit more...