Short answer: A spiral galaxy is, in fact, spherical-like.
To understand how, let us as a starting point look at Wikipedia's sketch of the structure of a spiral galaxy:
A spiral galaxy consists of a disk embedded in a spheroidal halo. The galaxy rotates around an axis through the centre, parallel to the GNP$\leftrightarrow$GSP axis in the image. The spheroidal halo consists mostly of Dark Matter (DM), and the DM makes up $\sim90\%$ of the mass of the Milky Way. Dynamically, it is the DM, that, ehrm, matters. And DM will always arrange itself in a ellipsoid configuration.
So the question should rather be: Why is there even a disk, why isn't the galaxy just an elliptical? The key to answering this lies in the **gas content* of a galaxy.
Both stars and Dark Matter particles - whatever they are - are collisionless; they only interact with each other through gravity. Collisionless systems tend to form spheroid or ellipsoid systems, like we are used to from elliptical galaxies, globular clusters etc.; all of which share the characteristic that they are very gas-poor.
With gas it is different: gas molecules can collide, and do it all the time. These collisions can transfer energy and angular momentum. The energy can be turned into other kinds of energy, which can escape, through radiation, galactic winds etc., and as energy escapes, the gas cools and settles down into a lower energy configuration. The gas' angular momentum, however, is harder to transfer out of the galaxy, so this is more or less conserved. The result - a collisional system with low energy but a relatively high angular momentum - is the typical thin disk of a spiral galaxy. (Something similar, but not perfectly analogous, happens in the formation of protoplanetary disks).
Stars also do not collide, so they should in theory also make up an ellipsoid shape. And some do in fact: the halo stars, including but not limited to the globular clusters. These are all very old stars, formed when the gas of the galaxy hadn't settled into the disk yet (or, for a few, formed in the disk but later ejected due to gravitational disturbances). But the large majority of stars are formed in the gas after it has settled into the disk, and so the large majority of stars will be found in the same disk.
Elliptical galaxies
So why is there even elliptical galaxies? Elliptical galaxies are typically very gas-poor, so gas dynamics is not important in these, they are rather a classical gravitational many-body system like a DM halo. The gas is depleted from these galaxies due to many different processes such as star formation, collisions with other galaxies (which are quite common), gas ejection due to radiational pressure from strongly star forming regions, supernovae or quasars, etc. etc. - many are the ways for a galaxy to lose its gas. If colliding galaxies are sufficiently gas-depleted (and the collision results in a merger), then the resulting galaxy will not have any gas which can settle into a disk, and kinetic energy of the stars in the new galaxy will tend to be distributed randomly due to the chaotic nature of the interaction.
(This picture is simplified, as the whole business of galactic dynamics is quite hairy, but I hope it gets the fundamentals right and more or less understandable).
This post imported from StackExchange Physics at 2014-06-04 11:29 (UCT), posted by SE-user Thriveth