It's amazing, yes, and at the same time, it makes perfect sense.
(Somewhat) similar mechanisms are at work whether you're pulling together stars into a galaxy, hydrogen gas into a solar system or water towards the drain of your bath tub - a pull towards the center, the centripetal force, slight variations producing "artifacts".