Systems tend towards low-energy states (because small perturbations keep things from getting stuck at local minima or saddle points. The lowest potential energy configuration for a bunch of particles pulled together by gravity is a sphere, because every point is as close to to the middle as possible.