Why does the square root of x^2+a^2=x+a?

It doesn't. If you check by multiplying x + a by itself, (x+a)^2, you get x^2 + 2ax +a^2.