Another way to look at it is to view the exponential and trigonometric functions as defined by a power series:
$\exp(x) = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \cdots$
$\sin(x) = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \cdots$
$\cos(x) = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \cdots$
This has the advantage that the $x$ can be anything, as long as we know how to multiply two of them, add two of them together, and divide them by a real number. In particular, it makes sense for both real and complex numbers.
Now you can put $ix$ into the definitions in place of $x$, and compute:
$\begin{align} \exp(ix) & = 1 + ix + \frac{(ix)^2}{2!} + \frac{(ix)^3}{3!} + \cdots \\ & = \left( 1 - \frac{x^2}{2!} + \cdots\right) + i \left( x - \frac{x^3}{3!} + \cdots\right) \\ & = \cos x + i \sin x \end{align}$
so the formula you quoted is seen to be a theorem rather than a definition. If we now assume that the familiar law
$\exp(a+b) = \exp(a) \exp(b)$
holds for arbitrary $a$ and $b$ (it does, and you can prove it from the power series definition) then we now have a way to compute the exponential of any complex number:
$\exp(x+iy) = \exp(x) (\cos y + i\sin y)$
where $x$ and $y$ are real.