When a galaxy is just a baby, forming out of a ginormous gas cloud a million light years across, two things happen. One is that the cloud collapses into stars. The other is that at the core of the galaxy a black hole forms and grows. It's unclear if it forms from the core of a supermassive exploding star (or from several that merge), or from some other mechanism. But every big galaxy has one at its heart, and it's big, and the mass of the black hole in many ways is related to the size of the galaxy itself. So we know that the formation of the galaxy itself and the black hole at its core are somehow linked.