Let $f$ be a holomorphic function on the set $U=\{z \in \mathbb{C}: 1 \leq |z| \leq \pi \}$. Assume that $max_{|z|=1}|f(z)| \leq 1$ and $max_{|z|=\pi}|f(z)| \leq \pi^{\pi}$.
How to prove that $max_{|z|=e}|f(z)| \leq e^{\pi}$?
Usually in such exercises one considers $g(z)$ of the form $\alpha z^nf(z)$ where $\alpha$ and $n$ are such that our assumptions on $f$ gives $|g(z)| \leq 1$ on both circles being the boundary of $U$. However it is not guarantedd that $n$ would be integer thus in general we don't get a holomorphic function $g$ for which we could apply the maximum principle. If $n$ happens to be rational one can overcome this difficulty by considering $(\alpha z^n f(z))^q$ where $n=\frac{p}{q}$. However in our example $n$ turns out to be $\pi$ and by considering $g(z)=f(z)/z^{\pi}$ we don't get holomorphic function. How to handle this case?
As you pointed out, to define the function $z\mapsto z^{-\pi}$ holomorphically, a branch cut is necessary, and it cannot be defined properly on the whole of the domain. Hence, to avoid this technical issue, theory of subharmonic functions is used. To be specific, instead of considering $z\mapsto z^{-\pi}$, one considers a subharmonic function $$ u(z) =-\pi\log|z| + \log|f(z)| \in[-\infty, \infty) $$ defined on $1\leq |z|\leq \pi$. Then, one can show that maximum principle applies to $u$, and one gets $$-\pi\log|z|+\log|f(z)|\leq 0, \quad\forall z,$$ as a consequence.
Note: A subharmonic function $u:\Omega \to [-\infty,\infty)$ is an upper-semicontinuous function such that $u(x)$ is less than or equal to the average of $u$ on $\partial B(x,r)$ for every $r>0$ such that $\overline{B(x,r)}\subset\Omega$. We can see that $\log|f|$ is subharmonic by Jensen's formula (and if $f$ does not vanish, it is harmonic.) By the definition of subharmonic function, if maximum of $u$ occurs at the interior point $x$, then $u$ is a constant on a component containing $x$.