Their questions concerned his office of baptizing. Hence he says that they asked him, Why then do you baptize? Here we should note that they are asking not to learn, but to obstruct. For since they saw many people coming to John because of the new rite of baptism, foreign both to the rite of the Pharisees and of the law, they became envious of John and tried all they could to hinder his baptism. But being unable to contain themselves any longer, they reveal their envy and say, Why then do you baptize if you are not the Messiah, nor Elijah, nor the Prophet? As if to say: You should not baptize,... since you deny that you are any of those three persons in whom baptism was prefigured, as was said above. In other words, if you are not the Messiah, who will possess the fountain by which sins are washed away, nor Elijah, nor the Prophet, i.e., Elisha, who made a dry passageway through the Jordan (2 Kgs 2:8), how do you dare baptize'? They are like envious persons who hinder the progress of souls, "who say to the seers, 'See no visions'" (Is 30:10).
Source: Commentary on John