Many things in mathematics are defined in a manner that is consistent and convenient. Defining 0! to be 1 is a similar case. In doing so nothing goes wrong, and the binomial theorem becomes simple and convenient to state. Without defining 0! as 1, it's a dreadful mish-mash of special cases.
Similarly with 0^0. Considering x^y where x and y are complex numbers, there is no consistent single value as x and y each approach 0. So in the reals and the complex numbers we leave 0^0 as undefined. However, in the case of natural numbers there is a case for declaring 0^0 to be 1. That's to make it convenient to talk about the set A^B as the collection of functions from B to A. When we do that we get |A^B| = |A|^|B|.
There is more than expected in mathematics that's defined for convenience.