The choice to take the absolute value inside the integral may be because the solution at that point was unwilling to assume that $a-x^2 \ge x^2+2ax+a$ for all $a$. If that inequality is the case, then the area is given by
$$
\left| \int_{-a}^0 \Big[ (a-x^2) - (x^2+2ax+a) \Big] \, \mathrm{d}x \right|
$$
(And we can easily see it is via any number of methods. Playing with this Desmos demo may prove intuitively convincing.)
But there are two concerns:
What if we don't know that is the case? Especially considering there's a free parameter $a$ running around, we'd definitely have to justify the inequality.
What if the functions intersect multiple times, changing which function is the larger one? In this case they don't, but here's an example where they do (below). Knowing there's only one interval to be concerned with is itself something needing justification.
So, to "play it safe," so to speak, we may take the absolute value of the integrand just in case, and down the road do manipulations or other analysis to justify removing it.
Why the outside integral? If you solve the two equations to find the $x$ values of intersection, you'll find that they occur at $x=0$ and $x=-a$. This is all well and good, but if $a$ can be any real value, we have to ask: which integral are we dealing with:
$$
\int_{-a}^0 |f(x)-g(x)| \, \mathrm{d}x
\quad\text{or}\quad
\int_0^{-a} |f(x)-g(x)| \, \mathrm{d}x \; ?
$$
The former integral assumes the $x=-a$ intersection is to the left of zero, and the latter to the right of side. We could calculate each individually: just assume the first has $a>0$ and the second has $a<0$. But ultimately the answer should be the same either way, right? And these integrals can be converted from one to the other just by swapping the order of the bounds (and picking up a factor of $-1$ on the way) since
$$
\int_a^b h(x) \, \mathrm{d}x
= - \int_b^a h(x) \, \mathrm{d}x
$$
And since we're ultimately just concerned with total area anyways, we can combine these two cases into one by dropping the sign - represented by taking the outer absolute value.