The rule that "anam= an+m" follows from "counting 'a's" as Jomo showed.
Of course that method cannot be used if n or m are not positive integers since we cannot have 0 'a's or -1 'a's.
But then we are free to define other powers of a any way we want. But it would be nice to define those other powers so that nice law, anam= an+m, is still true for other numbers.
0 has the property that, for any n, n+ 0= n. So we want to have ana0= an+ 0= an. As long as a is not 0, we can divide both sides by an. We can have that same rule true as long as a0= 1.
For any positive n, there exist -n such that n+ (-n)= 0. ana-1= an- n= a0= 1. Again, dividing both sides by an (again requiring that a is not 0) we have a-n= 1/an.
So x(x-1)= x1-1= x0= 1.
And x2(x-2)= x2- 2= x0= 1.