Operation on Roots 1

Hi, please can someone explain why the first expression equals a but the second one is absolute value of a

I believe the first expression should also be equal to the absolute value of a. This is because a must be positive or zero considering that we can’t have negative under the square root sign.

a can be negative in \sqrt{a^2} but not in (\sqrt{a})^2.