Random chance does indeed play heavily into planetary system formation. It is basically survivor bias where we only see the material that randomly ended up in a stable orbit but can not see the huge amount of material which were either flung into the Sun or out into far space. Any planetoid which was not in a stable circular orbit would likely end up crashing with another object changing its orbit or at least get pulled out of orbit by these other objects.
Latest Answers