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?"
It's not. But orbits do tend to coalesce around the same plane, this is true. Planets pull on each other, and over time this results in orbits being on a similar plane. However, it's not perfectly flat - there is some variation, just look at Pluto as a good example.
The same orbital mechanics that cause star systems to look this way also translates to galaxies.
In short, stuff likes to stay together, but when said stuff is in motion, they instead form orbits of similar inclination. The rings of Jupiter and Saturn also display this. If I remember correctly, part of that mechanism is called "Sheparding"
And if you were to go what one would consider "up" from this percieved orbital plane, then you'd be going in that direction. There's nothing special, there's just less stuff there. The same orbital mechanics apply, you're just on a much more inclined orbit.
The solar system is mostly in one plane because it formed from a cloud of gas. The cloud of a gas has some total non zero rotation and as the cloud collapses interactions flatten the cloud into a disk, where all of the planets formed.
The initial conditions had a definite rotational bias. This is preserved in the current orbital plane and direction.
On top of that, anything massively off that plane is liable to hit or interact with the material in the plane, given enough time. It will be flung around, eventually either out of the system or into the plane.
Stuff orbiting relatively close to the plane will have a biased pull towards the "average" plane. This will slowly flatten the orbits out.
All these processes take a lot of time. The solar system, in general, has had enough time to settle. The ort cloud and other outer bodies are still quite chaotic. We see a lot more off plane than within the traditional solar system. They experience the latter effects far less, and so take longer to equalise. They still have a bias towards the initial spin however.
It's been a long time since I got my astronomy degree, but your version is what I recall also. Whatever small rotational perturbation in the initial gas becomes more pronounced as it coalesces in on itself and defines the plane of the star system. Planets form within this plane after it is defined, and they all travel in the same direction around the star.
Regarding galaxies, the most common spiral ones like our own Milky Way follow the same principle at a larger scale. But there are also elliptical galaxies, not to mention irregular ones. In an elliptical galaxy, there is a more random movement of stars in a cloud around its core. So they look more 3D I guess, to go back to what the OP was asking about. I seem to recall the most accepted explanation for how these form is from the aftermath of a collision between 2 spirals? So presumably, when our galaxy collides with Andromeda in several billion years time, the resulting combined galaxy may emerge as an elliptical?