When planets are coalescing not all debris falls straight smack bang into the centre of mass some will hit off centre and like kicking a football (the proper round ones) if you kick it off centre you introduce a spin.
The hundreds of billions of impacts to a forming planet will give it a spin and without anything to stop it it will continue to spin.
This is why Earth’s days are slowly getting longer because the tides cause drag slowing the earth’s rotation.
Latest Answers