Asking about the cost function

why we take the total square(prediction - target) not only the total (prediction - target) ??

Hello, please check this out.