Black holes are ambush predators, not hunters. They only eat things unlucky enough to get into unstable orbits ridiculously close to the black hole.
Otherwise, they act as an ordinary source of gravity, like the Sun or Jupiter but much bigger. As such, they can attract matter looking for a place to set up a stable orbit toward the center of the galaxy, or expel matter in an unstable orbit away from the center (or just leave it to escape to its freedom). The supermassive black hole can serve as the nucleus around which the central regions of a galaxy organizes itself, like a solar system orbiting a star.
And as for that little bit of unlucky matter that they *do* eat, that matter first must dissipate all its angular momentum through intense radiative heat loss upon friction with other unlucky matter. This produces powerful radiation that can blow away stray gases and other small particles...and appears to us as a quasar or active galactic nucleus (a more general term referring to quasars and similar but weaker phenomena of supermassive black holes snacking). So the matter about to be "eaten" by the black hole can also be like a star, and its radiation pressure can clean out junk the middle of a galaxy, much as stars blow away gas in their birth places once they "turn on."
So black holes are not simply destructive forces. At the right distance, they can act as organizing principles. And the vast majority of matter will be at the right distance, whether flung there by radiation pressure from matter on its way to being eaten or unstable orbital dynamics with other matter near the center, or never having ventured dangerously close in the first place.