19 This is the testimony given by John when the Jews sent priests and Levites from Jerusalem to ask him, ‘Who are you?’ 20He confessed and did not deny it, but confessed, ‘I am not the Messiah.’ 21And they asked him, ‘What then? Are you Elijah?’ He said, ‘I am not.’ ‘Are you the prophet?’ He answered, ‘No.’ 22Then they said to him, ‘Who are you? Let us have an answer for those who sent us. What do you say about yourself?’ 23He said,In the prologue, the question of Jesus' identity was front and center. However, we largely glossed over the secondary character of that section, John. He comes to the forefront in an interesting way in this section. Verses 19-28 are part of a larger unit, stretching through 2:11. 1:19-51 cover four days. Moloney argues that the four day schema is borrowed from Exodus 19 where the law was given as a gift to the people along with Pentecost observance practices. 1:19-51 are preparatory for the revelation of the glory of the Lord, not in the law, but in Jesus. The first three days in our narrative (two of which we are examining here) are focused on John. But perhaps it might be better to say that they're focused through John.
‘I am the voice of one crying out in the wilderness,
“Make straight the way of the Lord” ’,
as the prophet Isaiah said.
24 Now they had been sent from the Pharisees. 25They asked him, ‘Why then are you baptizing if you are neither the Messiah, nor Elijah, nor the prophet?’ 26John answered them, ‘I baptize with water. Among you stands one whom you do not know, 27the one who is coming after me; I am not worthy to untie the thong of his sandal.’ 28This took place in Bethany across the Jordan where John was baptizing.
29 The next day he saw Jesus coming towards him and declared, ‘Here is the Lamb of God who takes away the sin of the world! 30This is he of whom I said, “After me comes a man who ranks ahead of me because he was before me.” 31I myself did not know him; but I came baptizing with water for this reason, that he might be revealed to Israel.’ 32And John testified, ‘I saw the Spirit descending from heaven like a dove, and it remained on him. 33I myself did not know him, but the one who sent me to baptize with water said to me, “He on whom you see the Spirit descend and remain is the one who baptizes with the Holy Spirit.” 34And I myself have seen and have testified that this is the Son of God.’ (NRSV)
John is questioned by various Jewish leaders about his identity and baptism. The precise nature of the delegation(s) isn't important. All that we need to see is that they represented the various religious authorities of the day. They came, responsibly, to check out John. Why was he doing what he was doing. Clearly John's actions had some sort of symbolic significance that were pointing to something. The leaders assumed that it was pointing to something about John's identity. The leaders, the guardians of orthopraxy were clueless.
They assumed that John believed himself to possess some sort of special eschatological role. They assumed that's what his baptism was all about. What else could warrant a ritual washing that denied the efficacy of the prescribed purification rights of the Mosaic Law? John's answering is surprising to everyone except the readers of the prologue. He denies the assumption that his baptism is about him. His role and purpose is to prepare the way of another chosen one of God. John calls people to repent so that their hearts would be ready for the coming of the Lord.
How does John know who this person is? God revealed it to him. He was given spiritual perception into the identity of Jesus, who here is described in two ways. First, he is the one on whom the Spirit descends and remains. This describes Jesus as the ultimate and final prophetic figure in the long line of prophets. He is the "prophet" and Elijah, the fulfillment of that set apocalyptic expectations. Additionally, Jesus is the lamb of God.
That last title has three main possible meanings. I prefer two of them, though I cannot rule out the third option absolutely. Many have found some sort of reference to an expiating or propitiatory sacrifice noting the action of 'taking away sins.' The problem is that the verb 'take away' isn't typically tied to notions of expiation or propitiation. Brown, in fact, provides a helpful parallel with 1 John 3:5, 8, where it is parallel to 'destroy.' This also, as Brown notes, fits the tenor of John's understanding of Jesus we find in the Synoptics. This inclines me to following Brown, who follows Dodd in seeing Jesus as the apocalyptic lamb. Thus we encounter in Jesus a messianic figure who crushes evil and brings freedom to God's people. This, then, meshes with a secondary interpretation, understanding Jesus as the paschal lamb. Thus, the description of Jesus is of one who brings deliverance and release from God's people from the hand of evil. Given Jesus exalted identity as God he must deal with the big problem, sin, and not just Rome.
Jesus followed John for a time, but that does not imply any inferiority on John's part. The gospel wants to be extremely clear about the relationship. Jesus is the superior and John is all about Jesus. His identity is wrapped up and relative to the identity of the chosen one.
John is presented here as the model witness. His ministry is not about himself but purposes to prepare and enable others to encounter God through Jesus. He received understanding via revealed rather than natural knowledge via the movement of the Spirit. Our knowledge of Jesus follows the same pattern. Yes the religious leaders of the day did not recognize Jesus for who he was, but that is because they were looking with natural eyes, not eyes that had been opened by the Spirit to perceive Jesus' true nature. Apart from that act, no one can know Jesus. And when we know Jesus our entire identity is an identity relative to him.
 A point well made by Keener.
 This seems to me to be the best way to understand John's baptism and why the Jewish religious leaders would care, or at least be narrated as caring.
 As helpfully pointed out by Lincoln.
 I found McHugh's argument for chosen one over son of God very convincing.