A galaxy isn’t a planet. Planets themselves are rarely perfect spheres. Earth is actually an oblate spheroid. Solar systems also exhibit planar geometry. They all spin. The angular momentum is enough to overcome the gravitational pull. If that momentum was not enough to overcome gravity, all that mass would collapse into a spherical object. Depending on how much mass would determine what kind of celestial body it is.
A galaxy isn’t a planet. Planets themselves are rarely perfect spheres. Earth is actually an oblate spheroid. Solar systems also exhibit planar geometry. They all spin. The angular momentum is enough to overcome the gravitational pull. If that momentum was not enough to overcome gravity, all that mass would collapse into a spherical object. Depending on how much mass would determine what kind of celestial body it is.