Planets form from a protoplanetary disk that has been rotating around its star. The initial energy that makes them rotate really matters to me.

Why did the protoplanetary disk start rotating around the star?
Where did the initial energy to rotate come from?
Why hasn't all the disk material been swallowed by the star?


Two rocks placed in space with no relative motion are going to be attracted by gravity, and hit. 3 rocks, placed in space with no carefully rigged symmetry, will likely miss each other, as the gravitational attraction of the additional rock changes their course. Those near misses are the beginning of rotation. Multiply that effect by trillions, and you have a protoplanetary disk. Of course, a lot of those molecules, dust and rock won't even start out with zero relative velocity, so near misses are inevitable.