One would think that it would have made sense for Jesus to baptize John since Jesus was infinitely greater than John. Even John questioned Jesus when He asked him to be baptized. “I need to be baptized by you, and do you come to me?” (Matthew 3:14). The Catechism of the Catholic Church (paragraph 536) teaches,
The baptism of Jesus is on his part the acceptance and inauguration of his mission as God's suffering Servant. He allows himself to be numbered among sinners; he is already "the Lamb of God, who takes away the sin of the world." Already he is anticipating the "baptism" of his bloody death. Already he is coming to "fulfill all righteousness," that is, he is submitting himself entirely to his Father's will: out of love he consents to this baptism of death for the remission of our sins. The Father's voice responds to the Son's acceptance, proclaiming his entire delight in his Son. The Spirit whom Jesus possessed in fullness from his conception comes to "rest on him." Jesus will be the source of the Spirit for all mankind. At his baptism "the heavens were opened" - the heavens that Adam's sin had closed - and the waters were sanctified by the descent of Jesus and the Spirit, a prelude to the new creation.
Baptism frees us from Original Sin. Since Jesus had no sin, neither Original Sin or personal sin, He did not need to be baptized. He chose to be baptized by John primarily for two reasons. The first reason is because He came to the world to give us an example to follow; to show us how to be truly human, as the Father intended. He wanted to embrace the human condition in every way, except for sin. His baptism shows us that if even the Son of Man who had no sin, humbled himself, then how much more are we to humble ourselves to ask for forgiveness and healing.
Christ’s baptism was also a theophany of the Holy Trinity, since at it the Three Persons of the Trinity were made known – the Son being baptized, the Spirit descending, and the Father affirming, and Sacramental Baptism foreshadowed.
And when Jesus was baptized, he went up immediately from the water, and behold, the heavens were opened and he saw the Spirit of God descending like a dove, and alighting on him; and behold, a voice from heaven, saying, “This is my beloved Son, with whom I am well pleased.”
We, too, are declared pleasing to the Father, when in Baptism our sins are removed and the Spirit fills us with divine life. Pope Benedict XVI states:
“Looking at the events in light of the Cross and Resurrection, the Christian people realized what happened: Jesus loaded the burden of all mankind’s guilt upon his shoulders; he bore it down into the depths of the Jordan. He inaugurated his public activity by stepping into the place of sinners. His inaugural gesture is an anticipation of the Cross.”