Conservation of angular momentum largely preserves angular momentum when gaseous planetary nebulas condense to form planets in spite of friction and collisions.This is illustrated below.
The angular momentum of bodies in our solar system are given in http://www.zipcon.net/~swhite/docs/astronomy/Angular_Momentum.html
They are not constant but the gaseous planets are of the same order of magnitude. Orbital Angular Momentum Body orbital radius(km) orbital period(days) mass(kg) L
Mercury 58.e6 87.97 3.30e23 9.1e38
Venus 108.e6 224.70 4.87e24 1.8e40
Earth 150.e6 365.26 5.97e24 2.7e40
Mars 228.e6 686.98 6.42e23 3.5e39
Jupiter 778.e6 4332.71 1.90e27 1.9e43
Saturn 1429.e6 10759.50 5.68e26 7.8e42
Uranus 2871.e6 30685.00 8.68e25 1.7e42
Neptune 4504.e6 60190.00 1.02e26 2.5e42
They are of order e^43. (Mars has less angular momentum. Some may have been distributed to the asteroid belt.)
Each outer planet seems to carry the same angular momentum!
I originally thought that Surya Siddhanta used constancy of angular momentum but it is even simpler. It is simply a snow plough theory which makes larger orbits collect more particles. See "How did the authors of Surya Siddhanta find the diameters of other planets in the solar system?"
I am giving this table to illustrate the constancy of angular momentum even in our solar system presumed to have condensed out of the primordial solar nebula, a fact ancients could have used to determine planetary diameters. Constancy of angular momentum requires planets to spin and orbit around the Sun (or the center of mass).
If there was an angular momentum to begin with is understood. Any large mass of gas or nebula will form eddies eventually by turbulence with rotations in opposite directions as rotations arise naturally (by fluid instability). If each part condenses to a star (and solar system) planetary systems will occur.
Our solar system may have been formed with another mechanism which is a passing star that imparted angular momentum to the original solar nebula.
Very large scale bodies also condense to galaxies (say) and must have black holes at their centers to trap angular momentum. Angular momentum can't be destroyed.
I wish to add this, the rotational angular momentum of all bodies.
Rotational Angular Momentum, L
Body/ mass kg/ radius(km) rotational period (days)/ L
Sun /695000 /24.6 /1.99e30 /1.1e42
Earth/6378 /0.99 /5.97e24 /7.1e33
Jupiter /71492 /0.41 /1.90e27 /6.9e38
Note that the Sun's rotational angular momentum is is also e^42. The spin angular momenta of all planets are small compared to orbital angular momenta.
The outer planets and the Sun have the same angular momenta!
Some kind of equipartition of angular momenta at work?