A related question would be: why most of the Solar System planet lie in the same plane? That is, why don't the planets close enough to the Sun rotate at random angle with each other (such as Pluto which rotates in a plane at some angle to the planets' plane)? Similarly, why do the stars in a galaxy tend to rotate around the center of the galaxy roughly in the same plane?
This question for the planets was answered by Gauss who analyzed gravitational attraction between planets.
Since the attraction between planets is much weaker than between planets and the Sun the effect of inter-planetary attraction is much slower than the speed of their rotation around the Sun. This allowed Gauss to do the following trick: he replaced in his analysis the planets that move around the Sun with solid rings around the Sun. Basically, imagine that the mass of a planet is spread over the planet's orbit. (Not quite evenly: the imaginary ring is slightly denser in the part of the orbit where the planet moves slower, but that detail is immaterial to the further analysis.)
Now imagine that instead of planet that initially rotate in different planes you have solid rings that represent the orbits, and those rings attract each other according to Newton's gravitational law. If the initial angle between planes is other than 90 degrees clearly the rings will attract each other toward a common plane somewhere between the rings' planes. Therefore the rings (which, as you recall, represent the planets' orbits) will slowly move toward the common plane. The interplanetary dust would dampen possible oscillation of the rings until they settle in the same plane.
I think something similar is happening with the galaxy with an important difference: the role of the Sun is played not by a single ultra-heavy object but by the combined mass of the numerous stars that are near the center of the galaxy. This is why Gauss's analysis is not quite applicable to the stars near the galactic center. On the other hand, for stars far enough from the center (so that for them the middle of the galaxy would be gravitationally equivalent to a single object) the analysis still holds.
Of course Gauss's analysis is just a 1st approximation: spreading the planets' mass over their orbits hides some some periodic effects. However, this analysis is sufficient to explain why orbits tend to a common plane.