That's one way they know black holes exist. The large black holes are called supermassive black holes. Suns confined in a region no larger than our Solar System. This region marks out the event horizon. Supermassive black holes reside in the center of galaxies.
Some scientists speculate that most galaxies, including our own, harbor a supermassive black hole.
The theory is that these large-mass black holes either formed from collapsed gas when the host galaxies formed, or they formed later, growing with time as the result of galaxy and black hole mergers. The supermassive black hole is the source of large amounts of energy. All of the gas that pours into a black hole puts up quite a fight. The gas, under the force of extreme gravity, heats to millions of degrees and releases bright light across most of the electromagnetic spectrum, from radio waves through optical light and into X-ray light. This is matter's final cry before it is lost forever.