Before answering your question, I first need to establish what the notation $a^x$ even means: otherwise, you are likely to just stay confused. The notation $a^x$ is an abbreviation for the somewhat more tedious expression $\exp[\ln(a)x],$ where $\exp$ is a function $\mathbb{R}\rightarrow(0,\infty)$ defined by the functional equation $\exp(x+y)=\exp(x)\exp(y)$ with $\exp(0)=1$ and $\exp(1)=\lim_{n\to\infty}\left(1+\frac1{n}\right)^n=:e,$ and $\ln$ is the inverse function. Typically, we use the notation $\exp(x)=e^x$ when doing calculus, but the definition for $a^x$ stays the same.
Keeping this in mind, you can use the chain rule to conclude that $$\frac{\mathrm{d}}{\mathrm{d}t}a^t=\frac{\mathrm{d}}{\mathrm{d}t}e^{\ln(a)t}=\ln(a)e^{\ln(a)t}=\ln(a)a^t.$$ However, in order to be able to make this conclusion, $\ln(a)$ must be a well-defined expression to begin with, and this is only true if $a\gt0.$ The expression $a^x$ is meaningless when $a\lt0,$ unless you confine $x$ to the set of integers, which is clearly not what we are doing.
I understand this is confusing, which is why I am a strong advocate for stopping the use of such bad notation and making it obsolete. I think we should stick to using the notation $\exp[\ln(a)t],$ even if it takes slightly more symbols to write. Distinguishing this notation from the power notation $x^n,$ where $n\in\mathbb{Z},$ is what I consider a healthy mathematical habit that eliminates confusion and is much less error-prone. \
Anyhow, the fact is that $$\frac{\mathrm{d}}{\mathrm{d}t}a^t=\ln(a)a^t$$ implies that $$\frac{\mathrm{d}}{\mathrm{d}t}\frac1{\ln(a)}a^t=\frac1{\ln(a)}\ln(a)a^t,$$ but it only implies that if $$\frac1{\ln(a)}$$ is a meaningful expression, and such an expression is only meaningful when $a\gt0,\,a\neq1.$ For $a=1,$ we have that $1^t=1,$ so $$\frac{\mathrm{d}}{\mathrm{d}t}1^t=0=0\cdot1^t,$$ and $$\frac1{\ln(0)}\neq0,$$ and furthermore, $$\lim_{a\to1}\frac1{\ln(a)}\neq0.$$ This is why $a\neq1$ is a necessary restriction.