Well, I am not catholic, but there seem to be a question that fascinated and perplexed many of the early Church fathers.
Justin Martyr addressed the baptism of Jesus, as a sign that He is manifested as the Christ, a sign for the Church first, and then the world.
Now, we know that he did not go to the river because He stood in need
of baptism, or of the descent of the Spirit like a dove; even as He
submitted to be born and to be crucified, not because He needed such
things, but because of the human race, which from Adam had fallen
under the power of death and the guile of the serpent, and each one of
which had committed personal transgression.... For it was not His entrance
into Jerusalem sitting on an ass, which we have showed was prophesied, that
empowered Him to be Christ, but it furnished men with a proof that He
is the Christ; just as it was necessary in the time of John that men
have proof, that they might know who is Christ.
According to Irenaeus, the baptism made Jesus the Christ since the Spirit anointing equipped him for the messianic ministry. Adelin Rousseau and Louis Doutreleau, sum up the meaning, as "On the one hand, having assumed flesh, the eternal Word has become 'Jesus'; on the other hand, having been anointed by the Father by means of the Spirit, the incarnate Word or 'Jesus' has become the
'Christ' = the 'Anointed One". Basically, before the baptism Jesus was not functionally the Christ, since the human nature was not divinely equipped.
... the Word of God, who is Savior of all and who rules the earth and the heaven, who is Jesus—as we have demonstrated—who has taken flesh and has been anointed of the Spirit by the Father, has been made Jesus-Christ. (Adversus
Gregory seem to points out that Christ was baptized not for His sake but for ours, sanctifying the waters of baptism for all generations to come and manifesting the the Trinity through the Spirit who comes to rest on him in the form of a dove and the voice of the Father that resounds from heaven.
Today He is baptized by John that He might cleanse him who was defiled, that He might bring the Spirit from above, and exalt man to heaven, that he who had fallen might be raised up and he who had cast him down might be put to shame.
(On the Baptism of Christ)
Augustine [known for giving baptismal regeneration its strongest underpinning], states that "...Christ wished to be baptized in order by His example to lead us to baptism. And so, in order that He might lead us thereto more efficaciously, He wished to be baptized with a baptism which He clearly needed not, that men who needed it might approach unto it." .... "For which reason [the efficacy of Christ's baptism because the heaven opened], when Christ was baptized, heaven was opened, to show that in future, the heavenly power would sanctify baptism. (Summa Theologica, Volume 1)
Benedict XVI's "Homily on the Feast of the Baptism of Our Lord", seem to reiterate the same stance as the church fathers:
“To inaugurate his public life and to anticipate the “Baptism” of his
death, he who was without sin accepted to be numbered among sinners.
He was “the Lamb of God who takes away the sin of the world” (John
1:29). The Father proclaimed him to be “his beloved Son” (Matthew
3:17) and the Spirit descended upon him. The baptism of Jesus is a
prefiguring of our baptism (Compendium of the Catechism of the
Catholic Church, n. 105).”
But, stresses on the humanity of Jesus and its identification with fallen human being, that is by virtue of being a human [albeit a fallen one], we needed the baptism:
... displays the path of abasement
and humility that the Son of God freely chose in order to follow the
Father’s plan, to be obedient to his will of love for man in all
things, to the point of the sacrifice on the cross. Now an adult,
Jesus initiates his public ministry, traveling to the Jordan river to
receive a baptism of repentance and conversion from John. There occurs
here something that might seem paradoxical in our eyes. Does Jesus
need to repent and convert? Certainly not. And yet He who is without
sin places Himself among sinners to be baptized, to perform this
gesture of repentance; The Holy One of God joins with those who
recognize their need of forgiveness and ask God for the gift of
conversion, that is, the grace to return to him with all their heart,
to be completely his. Jesus wishes to place Himself among sinners,
making himself solidary with them, expressing God’s nearness. Jesus
shows himself to be solidary with us, with our effort to convert, to
leave our egoism behind, to turn from our sins, to tell us that if we
accept him in our lives he is able to lift us back up and lead us to
the heights of God the Father. And this solidarity of Jesus is not, so
to say, a simple exercise of the mind and will. Jesus has truly
immersed himself in our human condition, he lived it through and
through, except for sin, and is able to understand weakness and