Then when he says, A controversy arose, he brings in the issue of the two baptisms. First, the issue is mentioned. Secondly, it is brought to John's attention (v 26). Thirdly, the issue is resolved.
Because both John and Christ were baptizing, the disciples of John, out of zeal for their teacher, started a controversy over this. And this is what he says, A controversy arose, i.e., a dispute, between the disciples of John, who were the first to raise the issue, and the Jews, whom the disciples of John had rebuked for preferring Christ, because of the miracles he did, to John, who did not do an...y miracles. The issue was concerning purification, i.e., baptizing. The cause of their envy and the reason why they started the controversy was the fact that John sent those he baptized to Christ, but Christ did not send those he baptized to John. It seemed from this, and perhaps the Jews even said so, that Christ was greater than John. Thus, the disciples of John, having not yet become spiritual, quarreled with the Jews over the baptisms. "While there is envy and fighting among you, are you not carnal?" (1 Cor 3:3).
Source: Commentary on John