They are doing neither, they are just different shapes. The shape of a galaxy isn't fixed forever. They evolve over time and can affected by interactions with other galaxies. But a spiral isn't spiraling inward and a globular isn't exploding outward. In both cases all the material is orbiting the center.
The different shapes of galaxies can be easily explained if you understand the major component of galaxies is plasma, which is a charged conductor of electromagnetism.
All of the observed shapes of galaxies can be produced on a miniature scale simply by manipulating electrical currents running through plasma in a laboratory. The three main factors that determine what shape will result are a) the number of electrical current filaments passing through the plasma, b) the plasma density of the regions that the currents pass through, and c) the passage of time.