It is because we cannot take a square root of a negative number since any number multiplied by itself is a positive number so you never get a negative value.
Therefore, it given an error if you try to take a square root of a negative number on a calculator.