I've seen in many textbooks that the following is just a definition: $$e^x = \sum_{n=0}^{\infty} \frac{x^{n}}{n!}$$
And then many textbooks just go ahead to prove the absolute convergence of the infinite series using, for example, ratio test, to conclude that the infinite sum actually makes sense. But even if the infinite series is absolutely convergent, how do I know the series does converge to $e^x$ instead of some other functions? The series convergence tests never mention about the limit that the series converges to. How do people come up with such a definition at the first place?
To see that your equation is true, you could take the derivative of the right side and see that you get the same thing. This shows that the sum is a solution to the differential equation
$$y'=y.$$
You can the check that plugging in $x=0$ on both sides yields the same number, so that you know the left and right sides both solve the initial value problem
$$y' = y, y(0) =1.$$
Since solutions to linear IVP's are unique, you know the left side equals the right side.
And note that there are different ways to define $e^x.$ If you use one of the other ways, then it's not too hard to show that it's Maclauren series is your sum.