Why is the earth shaped like a sphere and not any other shape: cube, prism?
Feynman wants to say you something, listen to him!
What else can we understand when we understand gravity? Everyone knows the earth is round. Why is the earth round? That is easy; it is due to gravitation. The earth can be understood to be round merely because everything attracts everything else and so it has attracted itself together as far as it can! If we go even further, the earth is not exactly a sphere because it is rotating and this brings in centrifugal effects which tend to oppose gravity near equator. It turns out that earth should be elliptical, and we even get the right shape for the ellipse. We can thus deduce that the sun, the moon, and the earth should be (nearly) spheres, just from law of gravitation.$_1$
Credits: $_1$Feynman lectures on Physics-Page No.7-5. Page numbers are subjected to change depending on the editions.