Why does a gabbai stand at the Torah reading, together with the reader and the person called to the Torah?
Rav Yisrael (Mahari) of Bruno (15th cen., Germany; Responsa, no. 90) follows the view that the Torah reader does not need to be corrected for mistakes (Tur, Raavyah, Tosafos) but adds that he instituted in Germany that a gabbai stand at the Torah reading with a text in order to correct the reader. He says that this was already the custom in Spain, France and Israel. He adds that as long as the gabbai can correct the reader, if he fails to do so they do not need to go back and reread the verse. (Note that while this responsum is also published in Terumas Ha-Deshen 2:181, this last part about the gabbai is omitted there)
Later authors (Levush, quoted in Mishnah Berurah 141:16) find mystical significance in the gabbai, seeing him as God’s representative in the giving of the Torah, with the reader representing Moshe and the person called to the Torah representing the nation. Mahari Bruno sees the gabbai’s role in a more practical way, which does not technically contradict Levush’s theory.
Mishnah Berurah also says there was an ancient practice for a gabbai to stand a the Torah reading (based on Maseches Soferim 14:14), but that does not seem to have been Ashkenazic custom until the 15th century.