'The Law and the Prophets'
Luke 16:16 "The law and the prophets were until John. Since that time the kingdom of God has been preached, and everyone is pressing into it."
John was the last Prophet of the Old Covenant and thus his teachings are meant for the Jews only.
In order for our Lord Jesus to fulfill the Prophets, He must accept John the Baptist as a prophet of God and also to submit to God's will or commandments through him.
Our Lord obeyed God's will and was baptized by John.
Luke 3:21-22 When all the people were baptized, it came to pass that Jesus also was baptized; and while He prayed, the heaven was opened.
God always reveals His Plans
Amos 3:7 Surely the Lord God does nothing, unless He reveals His secret to His servants the prophets.
Before God carries out any plan or will, He will send His prophets to prophesy or proclaim His coming events.
Mat 3:1-3 In those days John the Baptist came preaching in the wilderness of Judea, and saying, "Repent, for the kingdom of heaven is at hand! For this is he who was spoken of by the prophet Isaiah, saying: "The voice of one crying in the wilderness: 'Prepare the way of the Lord; make His paths straight.' ".
John the Baptist was to prepare the Jews so that they would repent and come back to the Lord by observing the Mosiac Law. It was God's will that all Jews must repent and be baptized, for only then will they find salvation at the coming of their Messiah as the redemption Lamb of God.
Many sinners admitted their weakness and sins and they were water baptized. But the Pharisees and lawyers who were stiff-necked and proud rejected God's will and the baptism of repentance.
Our Lord recognised John the Baptist as the greatest prophet in the Old Covenant. However, all those counted worthy to be inside the Kingdom of God is greater than him
Luke 7:28-30 For I say to you, among those born of women there is not a greater prophet than John the Baptist; but he who is least in the kingdom of God is greater than he." And when all the people heard Him, even the tax collectors justified God, having been baptized with the baptism of John. But the Pharisees and lawyers rejected the will of God for themselves, not having been baptized by him.
What were revealed to John the Baptist?
1. Great and Dreadful Day of the Lord which was the day when Judaism or the Old Covenant of the Mosiac Law was obsolete, thus reducing the Jews to be like Gentiles.
2. To preach repentance and Kingdom Gospel to the Jews
3. Water baptize the repented Jews
4. Prepare the Jews to become devout Jews so that they could belief and accept Jesus as the Messiah.
Note while John baptized the Jews for their repentance and brought them back to the Lord, he was also fulfilling the role of the coming Elijah the prophet in Mal 4:5-6.
5. The Messiah was the Lamb of God
6. Accept the prophesied New Covenant
Jer 31:31-33 "Behold, the days are coming, says the Lord, when I will make a new covenant with the house of Israel and with the house of Judah— not according to the covenant that I made with their fathers in the day that I took them by the hand to lead them out of the land of Egypt, My covenant which they broke, though I was a husband to them, says the Lord. But this is the covenant that I will make with the house of Israel after those days, says the Lord: I will put My law in their minds, and write it on their hearts; and I will be their God, and they shall be My people."