Like much of arithmetic, the meaning of a zero exponent (and negative, fractional, and irrational exponents) is chosen because it forms an extension of previous mathematics that obeys most of the original rules.
Historically and logically, arithmetic starts with only the positive whole numbers and the increment operation, and everything beyond that is just layers of extensions.
The relevant case here is that exponentiation is first recursively defined for positive integral exponents by:
a1 = a
a * an = an+1
So the natural (ha ha!) thing to do is to flip the recursive step around and go backwards:
an = an+1 / a
and for a [x=] 0, this provides us with the definition for nonpositive integral exponents. In particular, for nonzero a:
a0 = a1 / a = a / a = 1
This isn't the only way, nor the only motivation, to arrive at nonpositive integral exponents. For instance, KL Kam gave reasoning based on using exponent arithmetic to extend the definition.
And this discussion wouldn't be complete without touching on 00. Notice that the above recursive definition fails when a is zero, because we can't divide by zero! KL Kam's fails for the same reason. Mathematically, 00 is left undefined because there isn't a value you can choose which will work with all common manipulations where that may arise. If a value is assigned to it at all, it is context defined and is often explicitly stated... most commonly because it can simplify notation when you write a polynomial like:
a + bx + cx2
as
ax0 + bx1 + cx2
(Yes, I know it doesn't simplify this notation, but this rewriting is useful for more complicated expressions, like Taylor series)
So because you're using x0 as a marker for the constant term it makes sense to define x0:=1 for x=0.