Why error function is squared?

I ready that error function is squared because it expands positive error by squaring them and neglects error less than one by reducing it. But i could use cube error function and more higher degree error function? Why is that we don’t use more higher degree function.