Why does acceleration need to be constant?
The equations you give don't require constant acceleration, they are true regardless:
\begin{align}
v(t) &= \int^t_0 a(t')dt' + v_0 \\
&= \int^t_0 \frac{dv(t')}{dt'}dt' + v_0 \\
&= \int^t_0 dv(t') + v_0 \\
&= v(t) - v(0) + v_0 \\
&= v(t)
\end{align}
where I used the definition of acceleration, $a(t) = \frac{dv(t)}{dt}$, on line 2. And similarly for position
$$
x(t) = \int^t_0 v(t')dt' + x_0 = \int^t_0 \frac{dx(t')}{dt'}dt' + x_0 = \int^t_0 dx(t') + x_0 = x(t) - x(0) + x_0 = x(t)
$$
using the definition of velocity, $v(t) = \frac{dx(t)}{dt}$, in the $2^{nd}$ step. Crucially, constant acceleration wasn't assumed: $a(t)$ could be anything differential-able.
I can't see why integration would need a constant acceleration as such.
In general it doesn't, but if you do assume it then the equations simplify massively :)
If acceleration is constant, then $a(t) \rightarrow a$ as it does not depend on time. This lets you pull it out of the integral, which makes the integral solvable. Starting from the definition of acceleration in integral form
\begin{align}
v(t) &= \int a(t)dt \\
&\rightarrow a\int dt \quad\text{ (!!)} \\
&= at+c
\end{align}
where $c$ is a constant and $(!!)$ means that I used the fact that acceleration is constant. If you consider $t=0$: $v(t=0) = c$ then it becomes obvious that $c$ is the initial velocity, $v(t=0)$, while I will rename as $v_0$.
\begin{equation}
v(t) = at+v_0 \tag{1}
\end{equation}
You can then repeat this process with position, $x$, given the definition of velocity
\begin{align}
x(t) &= \int v(t)dt \\
&= \int (at+v_0)dt \quad\text{ (!!)} \\\\
&= \int at dt + \int v_0 dt \\
&\rightarrow a\int t dt + v_0\int dt \quad\text{ (!!)} \\\\
&= \frac{1}{2}at^2 + v_0t + c
\end{align}
Considering $t=0$ again: $x(t=0) = c$, so we have
\begin{equation}
x(t) = \frac{1}{2}at^2 + v_0t + x_0 \tag{2}
\end{equation}
Equations 1 and 2 are used extensively throughout classical Physics, because we often consider simple cases with constant forces (e.g. gravity and electrostatics), which produce constant accelerations. There are also some more equations for constant acceleration, more on them here.
If acceleration isn't constant, then you have some function of $t$. For example,
\begin{align}
a(t) &= xt^2 + yt + z \\
v(t) &= \int a(t) dt \\
&= \int (xt^2 + yt + z) dt \\
&= \int xt^2 dt + \int yt dt + \int z dt \\
&= x\int t^2 dt + y\int t dt + z\int dt \\
&= \frac{1}{3}xt^3 + \frac{1}{2}yt^2 + zt + c
\end{align}