Why is square of coefficients used for linear/logistic regressions, why not cube or linear?

Itâ€™s easy to compute the square. All results are positive, which is not true if you use an odd-order power.

It also has a very simple partial derivative - this is very handy when computing the gradients.