When you start defining powers, they are just shorthands for repeated multiplication, i.e.
$$a^n=\underbrace{a\cdot a\dotsm a}_{n \text{ times}}\,.$$
Clearly, this only works for $n$ being a positive integer. (On the other hand, $a$ can be any number.)
From this definition, you can derive two rules,
$$ a^{n+m}=\underbrace{a\cdot a\dotsm a}_{n+m \text{ times}}=\underbrace{a\cdot a\dotsm a}_{n \text{ times}}\cdot \underbrace{a\cdot a\dotsm a}_{m \text{ times}}=a^n\cdot a^m \tag{*}$$
and
$$\left(a^n\right)^m=\underbrace{\underbrace{\left(a\cdot a\dotsm a\right)}_{n \text{ times}}\dotsm \underbrace{\left(a\cdot a\dotsm a\right)}_{n \text{ times}}}_{m \text{ times}}=\underbrace{a\cdot a\dotsm a}_{n\times m \text{ times}}=a^{nm}\,.\tag{#}$$
At first, these are still only defined for $n$ and $m$ positive integers, but they seem pretty basic rules for taking powers.
Now, you can try to extend this definition of powers to other exponents. In some sense, that means that you do not think of powers just as shorthand notation for repeated multiplication, but as a mathematical operation in its own right. You can denote this as a function$$f_a(n): n\mapsto a^n\,,$$which you have already defined for positive integer $n$. Of course, you want to do this in such a way that the integer powers still work as before and that the rules carry over as well as possible. Then, Equations (*) and (#) form the natural "functional equations" to define $f_a$ for other arguments. (In other words: It's a choice, but it's the obvious one.)
For example, for zero and negative integers, Equation (*) you can deduce that $a^0=1$ and $a^{-n}=1/a^n$ (do you see how?). For fractions, you can the use (#).
Note that
- you pay a price in that now, $a$ is more restricted -- you cannot take a real root of a negative number, for example, and neither can you define a continuous square root function $\mathbb{C}\to\mathbb{C}$,
- there is extra work to do to go to real (as opposed to rational) $n$.
Anyway, upshot: Equations (*) and (#) are rather natural rules, and help generalise powers to rational exponents.