Baptism is done for uniting the sinner with the forgiver of sins; Jesus Christ
When we are baptized in the name of Jesu Christ, we are united with Christ in his death, burial, and resurrection. (
Rom 6:3-10)
Jesus had no need to repent and be baptized in His own repentance, because He had no sin, but, when he was baptized by John, he was baptized into our repentance, being buried and together and united with us in our (man's) repentance and confession of sin. Jesus submitted to john's baptism, so he could took take on our sin and carry it to cross, where the sins of all that repent are nailed with him on the cross. (
Mark 1:4-5).
Mark 1:4-5 John the Baptist appeared in the wilderness preaching a baptism of repentance for the forgiveness of sins. 5And all the country of Judea was going out to him, and all the people of Jerusalem; and they were being baptized by him in the Jordan River, confessing their sins.