First, you probably learned some time ago that for a any number and n a positive integer "\(\displaystyle a^n\)" is defined as "a multiplied by itself n times". So \(\displaystyle a^3= a*a*a\), etc. From that we can prove two nice properties, \(\displaystyle (a^n)(a^m)= a^{n+m}\) and \(\displaystyle (a^n)^m= a^{nm}\). \(\displaystyle (a^n)(a^m)\)=(a*a*…(n times))(a*a*a...(m times)) so we are multiplying a total of m+ n "a"s together. We can think of \(\displaystyle (a^m)^n\) as an array of "a"s written as n lines, each line with m "a"s, so a total of nm "a"s.
Now, we want to define \(\displaystyle a^x\) where x is not a positive integer. We are free to define things any way we like (as long as everyone agrees to the definitions) but we would like to have those nice properties still true. That is, we want to define \(\displaystyle a^0\) so that \(\displaystyle a^{n+ 0}= (a^n)(a^0)\). But n+ 0= n so we must have \(\displaystyle a^{n+ 0}= a^n= a^na^0\). In order that this be true for all n, we must define \(\displaystyle a^0= 1\), That's the "logic"!