The spherical shape of planets is not a result of an evolutionary process but rather a consequence of their formation and the forces acting upon them. When a planet forms, it starts as a rotating disk of gas and dust known as a protoplanetary disk. Over time, the material within the disk accretes together due to gravity, forming larger and larger bodies called planetesimals.
The planetesimals continue to collide and merge, growing in size, until they eventually form protoplanets. These protoplanets continue to accrete material and undergo further collisions, gradually building up their mass. As the protoplanet grows larger, its gravity increases, and the force of gravity acts to pull the material inward towards the center.
The material in the protoplanet becomes subject to intense pressure and the force of gravity acting equally from all directions. Under these conditions, the most stable configuration for the material is a sphere. Gravity acts to compress the material, and the spherical shape is the most efficient way for the protoplanet to distribute its mass and minimize the overall energy of the system.
Therefore, the spherical shape of planets is a natural outcome of the force of gravity acting on the material during their formation process. It is not a result of a gradual evolutionary process, but rather a consequence of the equilibrium state that a massive object achieves under the influence of its own gravity.