Why raise an optimization parameter to the power of two?

34 Views Asked by At

I've read this SO thread which doesn't answer my question. So I have a cost function to minimize: enter image description here where R is the given outline of a rectangle, and R* is the actual one. Why is it raising to the power of 2 for this option? For example for S (area), it's calculating the first degree.