Have you ever noticed that, since YHWH first gave us rain in the days of Noah, He has been using water to cleanse each man of his sin through baptisms and the washing of clothing? We read myriad commandments in the Laws He gave to Moshe to cleanse both body and clothing of impurities. Before they met YHWH at Mt. Sinai, the entire nation was to wash and consecrate themselves because God had intended to make them a holy nation - a nation of priests. Every priest also consecrated himself in a like fashion before being ordained. Washing is very important to YHWH as we can see in the following verses:
In Psalm 51:1-7, after he committed adultery with Bathsheba, David asks to be cleansed: ...2 Wash me completely from my guilt, and cleanse me from my sin. 3 For I know my crimes, my sin confronts me all the time. 4 Against you, you only, have I sinned and done what is evil from your perspective; so that you are right in accusing me and justified in passing sentence. 5 True, I was born guilty, was a sinner from the moment my mother conceived me. 6 Still, you want truth in the inner person; so make me know wisdom in my inmost heart. 7 Sprinkle me with hyssop, and I will be clean; wash me, and I will be whiter than snow.
And in the beginning of the Book of Isaiah, the prophet tells the nation in Isaiah 1 verses 15-16 and 18 to "Wash and make yourselves clean."
In Jeremiah 4, the prophet beseeches Jerusalem to "Wash the evil from your heart and be saved. How long will you harbor wicked thoughts?"
That was the job John the Baptist was doing on the day he baptized Yeshua. As a Levitical priest, he was helping his fellow believers cleanse themselves of evil/sin by using the Jordan as a Mikvah or baptismal pool. As Luke 3:3 explains, "He went into all the country around the Jordan, preaching a baptism of repentance for the forgiveness of sins."
But even John was confused, wondering why he would have to baptize and purify one like Yeshua who was without sin, for - as we read in Matthew 3:12 ... Then came Y'shua from Galeela to the Yordanan to Yochanan, 13. to be immersed by him. 14. But Yochanan was refusing him and said, I should be immersed by you, and you come to me. 15. Then Y'shua answered and said to him Allow (it) now for as such, it is proper for us to fulfill all righteousness, and then he allowed it.
To fulfill righteousness? Surely not Yeshua, for He was without sin! No, it was for the righteousness of mankind. Before he could minister and teach mankind how to apply the laws YHWH gave to Moshe in the way God intended (in accord with the Spirit of the Law, not just the Letter or legalism of the Laws which is how the Levites had mistaught the laws), Yeshua first took on the sins of the world which had been committed until the day He ministered. When Yeshua was immersed, YHWH was keeping His word. He was not flooding the world to rid it of sin; He was covering Him who carried the sins of the world in Him so all who believe would be found righteous in YHWH's eyes.