Our solar system mostly revolves around the sun on the same axis (apart from Pluto). Our galaxy does the same (along with other galaxies). Why? Gravity is linear?
Would it matter if we tried to escape the sun's gravity by going "up?"
I asked this question many years ago on a Usenet group, and the answer was along the lines of what we're seeing is many millions of years after those orbits began, and that they all eventually flatten out due to the gravity of the other objects in orbit.
So you could have 2 objects at roughly the same orbital distance but perpendicular to one another (eg. one orbiting the star's poles and the other around it's equator), and over time the small amount of gravitational force they exert on one another will bring them roughly into the same plane.
Hopefully someone better versed in the topic can come along to explain it better than I can.
Keeping in mind the object with the larger mass will (over those millions of years) pull the smaller object closer in all dimensions/planes
It's still hard for me to get my head around, it would be great to see an animation showing this with perhaps 3 or 4 objects. It's especially hard for me to visualize the gas cloud around a star coelescing into a plane, even before the more solid objects form.
Is this because of rotational mechanics around the star?
So, the star and planets all started as one big gas nebula, then the nebuka as a whole started spinning due to uneven distribution of matter within the cloud as it condensed. This spin increased over time and as the sun formed in the center, and planets clumped around in its orbit. The spin relative to each other, along with some interesting collisions between massive bodies, is why a few don't fit the general mold of spinning the same ways on the same plane. We may have even picked up a planet or two over time that was ejected from another solar system!
This video does an ok job of explaining the spinning and planet formation part. I'm sure thete are better ones out there.
But the biggest reason is the way gasses form in space. As noted in the above video at the 8:45 mark. Gasses aren’t able to fall back into the center along their axis of spin because of their momentum. But the gassed above and below the plane can move towards the gathering material there by gravity and so it flattens out.