Jesus, sinless, doesn't need to be baptized, and yet he came to John for baptism. It is hard to know exactly why Jesus came to John to be baptised. We are not alone on this matter; even John himself protested, 'It is I who need baptism from you and yet you come to me'. Jesus gave no explanation but simply insisted, saying: 'Leave it like this for the time being, it is fitting that we should, in this way, do all that righteousness demands'.
Jesus' baptism certainly has nothing to do with the expiation of his own sin, but rather it has something to do with John the Baptist's mission.
First, Jesus recognized that John's baptism came from God, and his mission was preparing the heart of the people for the coming of the Lord. John himself declared his mission was that he was not the Christ, but only a voice crying in the wilderness, paving the way for the Lord (John 1,23). He came to testify for the Light, and his baptism served as the sign of repentance. The One who is coming after him is mightier than he, and John is unfit to undo his sandals. He will baptize people with the Holy Spirit and fire Lk 3,15-17. John made it clear to his disciples, pointing to the man Jesus saying, 'behold, the Lamb of God who takes away the sin of the world ( Jn 1,29).
Second, at Jesus' baptism there was the voice from on high to affirm his identity, 'This is my Son, the Beloved, my favour rests on him'.
Third, after Jesus came out of the river, three significant events happened: a/ the heaven opened, b/ the voice of the Father came from on high and c/ the descent of the Holy Spirit in the form of a dove resting upon him. Jesus' baptism revealed the Holy Trinity, the Three Persons of God, and it also revealed Jesus' identity.
Fourth, an act of righteousness means to do what is right, and just, in accordance with God's will. Jesus' baptism signified his commitment to do not his own will but God's. In his public ministry he once confirmed, that He came to do not his own will but the Father's. Through Jesus we know about God redemptive plan to save the human race.
Fifth, Jesus went one step ahead of John. John's mission was preparing the way for the Lord. Jesus declared he was not preparing the way, but he actually is the way. Jesus' leadership went ahead of his people. To protect His people, Jesus went ahead of them to show the right way, not follow after as the world's leaders do.
At our baptism, there are two signs: one is visible and the other is invisible. a/ the visible sign has something to do with water and oil, and b/ the inwards affect John talked about; it is the inerasable seal of the Holy Spirit, Jesus gives to a baptised person. In this sense our baptism is the combination of John the Baptist's baptism (baptism with water) and the power of the Spirit Jesus gives (baptise with the Holy Spirit). Our baptism enables us to incorporate our lives into the mystical Body of the Risen Christ, through the love and power of the Risen Christ.