Gravity.
Gravity pulls everything towards the center of mass.
This means all matter “wants” to get as close to that center of mass as possible, so for a giant lump of molten material like early earth, which could flow around, the shape that let the most mass get as close to that center as possible is a sphere, where every point on the edge of the sphere is (roughly) the same distance away from the center.
In a cube for example, the corners of the cube would be further away from the center than the faces of the cube.
Latest Answers