First, your script doesn't really "iterat[e] through the numbers 1-1000, each being raised to the 1-100th power". Because you never reset the $x$ variable between runs of the inner loop, you're actually computing $(a+2)^{\lfloor a/98\rfloor+2}$ for $0<a<998\cdot 98$.
This creates some minor differences with the nice counts you would get if you were looping $x$ and $y$ independently from $2$ to $999$ and $2$ to $99$. Never mind, the overall pattern is broadly speaking the same.
The iterated digit sum of a positive integer is none other than the remainder when dividing the original number by $9$, except when the remainder is $0$ the digit sum is $9$ instead. This is the basis for casting out nines.
Now whenever $x$ in $x^y$ was divisible by $3$ and $y\ge 2$, then $x^y$ is divisible by $3^2=9$, so all those cases (about a third of all) yield the digit sum $9$. On the other hand, $x^y$ cannot be divisible by $3$ unless $x$ is divisible by $3$, so digit sums of $3$ or $6$ are impossible.
When $x$ is not divisible by $3$ it is coprime to $9$, and therefore Euler's theorem says that $x^y\equiv 1 \pmod 9$ whenever $y$ is a multiple of $\varphi(9)=6$. Of course, the remainder is also $1$ when $x\equiv 1 \pmod 9$ no matter what $y$ is. This creates a clear overweight of $1$ among the sums.
Finally, a square modulo $9$ is always one of $\{0,1,4,7\}$ -- and $x^y$ is a square whenever $y$ is even. This explains why you see $4$ and $7$ more often than $2$, $5$, or $8$. On the other hand, a cube modulo $9$ is always one of $\{0,1,8\}$, so when $y\equiv 3\pmod 6$, a third of the $x$ values produce $8$, explaining why $8$ is more popular than $2$ and $5$.
We can also count the popularity of each residue directly by writing up a table:
$$ \begin{array}{r|cccccc}
y = & 6n+6 & 6n+7 & 6n+2 & 6n+3 & 6n+4& 6n+5 \\ \hline
0^y \bmod 9 = & 0 & 0 & 0 & 0 & 0 & 0 \\
1^y \bmod 9 = & 1 & 1 & 1 & 1 & 1 & 1 \\
2^y \bmod 9 = & 1 & 2 & 4 & 8 & 7 & 5 \\
3^y \bmod 9 = & 0 & 0 & 0 & 0 & 0 & 0 \\
4^y \bmod 9 = & 1 & 4 & 7 & 1 & 4 & 7 \\
5^y \bmod 9 = & 1 & 5 & 7 & 8 & 4 & 2 \\
6^y \bmod 9 = & 0 & 0 & 0 & 0 & 0 & 0 \\
7^y \bmod 9 = & 1 & 7 & 4 & 1 & 7 & 4 \\
8^y \bmod 9 = & 1 & 8 & 1 & 8 & 1 & 8
\end{array} $$
Counting instances of each result in this table you should match up your experimental frequencies pretty well. (Each of the cells is hit by about $\frac{98\cdot 998}{54}\approx 1811$ of your test cases).