For negative values of x, $(x^2)^{0.5}$ is $\pm x$.
For negative values of x, $(x^{0.5})^2$ is undefined.
Why do textbooks insist the following: for negative values of $x$, $\sqrt{x^2} = |x|$?
Surely the correct way to think about this is that for negative values of $x$, $\sqrt{x^2}$ is either undefined or equal to $\pm x$, depending on the order the operations are conducted in?
See here for an example: http://www.jamesbrennan.org/algebra/radicals/simplifying_radical_expressions.htm
When $a$ is positive there are indeed always two solutions to the equation $x^2 = a$. Mathematicians have agreed that only the positive one will be called $\sqrt{a}$.
The textbooks insist on that convention.
In any particular algebra problem you may need to think about both solutions.
Edit (in response to the edited question).
When $a$ is negative, that equation has no solution, so you can't talk about $a^{1/2}$. You can talk about $(a^2)^{1/2}$. Whether that's $|a|$ or $\pm a$ depends on the convention for raising to the power $1/2$, which might mean "find the (positive) square root,$\sqrt{a^2}$" or "find both roots". I'm not sure that convention is firmly established.