What prevents galaxies from collapsing towards the galactic center? [duplicate]

Galaxies have supermassive black holes at their cores exerting huge gravitational field. What is the reason that galaxies don't contract towards the center? What prevents this from happening.

Consider a global cluster that has little/no angular momentum. The statistical distribution with respect to radius and velocity is Maxwellian: $$\propto \exp [-\beta (m\Phi -\tfrac{1}{2}m{{v}^{2}})]$$ where $${{\beta }^{-1}}$$ denotes the average energy per degree of freedom and $$\Phi (r)$$ the gravitational potential. Heavier stars are concentrated near the center and move slowly. The cluster will never reach a true equilibrium because the lightest, fastest stars can boil off and escape, taking energy with them. The main effect of angular momentum is to make a globular cluster somewhat oblate.
Galaxies tend to be flatter rather than globular, so now consider an accretion disk consisting of rocks in roughly circular orbits around a central mass. To first order, the rocks orbit at $$v=\sqrt{GM/r}$$, but they can exchange momentum whenever there they have a close encounter. You can model this effect with an additional velocity diffusion term, much like shear viscosity in a fluid. The extra force opposes the orbital velocity and promotes contraction of the disk. (The distribution of dark matter changes the picture a little, because it tends to flatten the galactic rotation curve, but there will be a “viscous” effect so long as $$v\ne \omega r$$ with $$\omega$$ independent of radius.)