Here comes positive feedback - if something is heavy it tends to attract more things so it is even heavier and heavier. At one point it will clean its surroundings. This is the process for those supermassive black holes to create. In middle of galaxies there is lot of stuff (stars) that can be "eaten" by these huge black holes. Plus they had a lot of time to do so.
EDIT (thanks for questioning the answer I was very sure with it but there are some problems):
As Rob Jeffries said, the mass could not be acquired this way (probably not all of it) because of radiation pressure: when stuff falls towards black hole in accretion disk there is lot of heat created which pushes the rest of gas away. See Eddington limit. https://en.wikipedia.org/wiki/Eddington_luminosity
So after checking some pages those are the theories I found:
"One possible mechanism for the formation of supermassive black holes involves a chain reaction of collisions of stars in compact star clusters that results in the buildup of extremely massive stars, which then collapse to form intermediate-mass black holes. The star clusters then sink to the center of the galaxy, where the intermediate-mass black holes merge to form a supermassive black hole."
"Stellar black holes result from the collapse of massive stars, and some have suggested that supermassive black holes form out of the collapse of massive clouds of gas during the early stages of the formation of the galaxy. Another idea is that a stellar black hole consumes enormous amounts of material over millions of years, growing to supermassive black hole proportions. Yet another, is that a cluster of stellar black holes form and eventually merge into a supermassive black hole."