In dimensional analysis, it does not make sense to, for instance, add together two numbers with different units together. Nor does it make sense to exponentiate two numbers with different units (or for that matter, with units at all) together; these expressions make no sense:

$$(5 \:\mathrm{m})^{7 \:\mathrm{s}}$$

$$(14 \:\mathrm{A})^{3 \:\mathrm{A}}$$

Now my question is plainly this: why do they not make sense? Why does only multiplying together numbers with units make sense, and not, for instance, exponentiating them together? I understand that raising a number with a unit to the power of another number with a unit is quite unintuitive - however, that's not really a good reason, is it?

A standard argument to deny possibility of inserting dimensionful quantities into transcendental functions is the following expression for Taylor expansion of e.g. $\exp(\cdot)$:

$$ e^x = \sum_n \frac{x^{n}}{n!} = 1 + x +\frac{x^2}{2} + \dots\,.\tag1$$

Here we'd add quantities with different dimensions, which you have already accepted makes no sense.

OTOH, there's an argument (paywalled paper), that in the Taylor expansion where the derivatives are taken "correctly", you'd get something like the following for a function $f$:

\begin{multline}
f(x+\delta x)=f(x)+\delta x\frac{df(x)}{dx}+\frac{\delta x^2}2\frac{d^2f(x)}{dx^2}+\frac{\delta x^3}{3!}\frac{d^3f(x)}{dx^3}+\dots=\\
=f(x)+\sum_{n=1}^\infty\frac{\delta x^n}{n!}\frac{d^nf(x)}{dx^n},\tag2
\end{multline}

and the dimensions of derivatives are those of $1/dx^n$, which cancel those of $\delta x^n$ terms, making the argument above specious.
