From the tap root of scripture in Genesis One through the closing of scripture in the final page of Revelation, a golden thread is woven meticulously, divinely through every page. Yes, the unifying theme of all of God’s inspired word is that someday one would come who would be the anointed Holy Man of God, the Messiah, the Christ, the Lamb of Sacrifice, the Lion of Judah, the Son of God, the Son of Man, Jesus. He would live; He would love; He would be crucified, He would reinstate mankind to our Creator; He would come back to life; He would return to God, and after a time, He would return as Ruler and King over all creation.
In Genesis 3:15 God tells Eve that from her seed (offspring) will come one (Jesus) who will bruise Satan on the head.
In Micah 5:2 scripture states that the coming Messiah will be born in Bethlehem.
In Isaiah 7:14 we are told that He’ll be born of a virgin.
In Zech. 11:12 God’s word states that the Christ will be betrayed for thirty pieces of silver.
In Isaiah 53 & Ps. 22:16 scripture points out that He’ll be crucified.
Isaiah 53 prophesies that He’ll be “pierced through for our transgressions, crushed for our iniquities; ...and by His scourging we’ll be healed.”
The odds of any other single man fulfilling all of these and the other 300 Messianic prophecies are about at likely as a blind man being able to pick a red golf ball in an entire universe packed with white golf balls on his first try. Those odds would be like covering the state of Texas with a 3 foot pile of quarters, then hiding one nickel and inviting someone to find it.
So, Jesus knew that His life must fulfill all that scripture said about Himself, He must be baptized because in Psalms 40 it says about Him, "Behold, I come; In the scroll of the book it is written of me.”