Judaism of the time expected two messiahs to come. One of them was called Messiah ben David, and he was to be a warrior king who would run the foreigners out of Judea and Galilee. Messiah ben David would restore the kingdom to the Israelites and reign from the throne as God's right hand. The other was Messiah ben Levi (sometimes called Messiah ben Joseph), and he would be a priestly messiah who was to restore the temple to purity. He would also heal the people and free those in bondage. This is how Jesus announced His own ministry by reading from Isaiah:
Luke 4:18-19 "THE SPIRIT OF THE LORD IS UPON ME, BECAUSE HE ANOINTED
ME TO PREACH THE GOSPEL TO THE POOR. HE HAS SENT ME TO PROCLAIM
RELEASE TO THE CAPTIVES, AND RECOVERY OF SIGHT TO THE BLIND, TO SET
FREE THOSE WHO ARE OPPRESSED, TO PROCLAIM THE FAVORABLE YEAR OF THE
LORD. [NASB]
It was expected that the Messiah ben David would come first to judge. Once he had established independence, the Messiah ben Levi could come.
When John announced the Messiah in Luke 3, he apparently had the Messiah ben David in mind:
Luk 3:16-17 John answered and said to them all, "As for me, I baptize
you with water; but One is coming who is mightier than I, and I am not
fit to untie the thong of His sandals; He will baptize you with the
Holy Spirit and fire. His winnowing fork is in His hand to thoroughly
clear His threshing floor, and to gather the wheat into His barn; but
He will burn up the chaff with unquenchable fire." [NASB]
The imagery John uses is that of judgment. The Messiah will come in judgment to separate the righteous from the wicked. He will baptize with the Holy Spirit (the righteous) but also with fire (the wicked). He comes to clear the threshing floor. The wheat will be placed in a barn (the righteous) but the chaff will be burned (the wicked).
The idea of two Messiahs comes from their reading of the Tanack. There are prophecies that speak of the Messiah coming in wrath and judgment and others which show Messiah serving in mercy, proclaiming liberty to the captives and restoring health to the suffering, and even himself being smitten. It was assumed that one Messiah could not do all of this, so they postulated two. However, the Scriptures show one Messiah with two comings.
If you include the Dead Sea Scrolls, then the two Messiahs comes even more into focus. In War Scroll, the Messiah is a prophet who takes no part in the war between the children of light and the children of darkness. But in other works, he is clearly ready for war. John shows several signs of being familiar with Qumran. He dresses like the Essenes and some of his preaching material is almost straight from their documents. However, when he tells the soldiers to "be satisfied with their pay" and "deal harshly with no man," we know that he has not imported the Essenic theology wholesale. If he had, the answer would have been "Resign your commission and become a proselyte, then you will be accepted by God." The Essenes believed that the full blessing of God was available to Essenes only, but Jews (both of birth and of choice) would be blessed also. John doesn't go that far.
The two messiahs theory is even made explicit in the Testament of the Twelve Patriarchs, an apocalyptic work which was expanded upon in Qumran.
My children, be obedient to Levi and to Judah. Do not exalt yourselves about these two tribes because from them will arise the
Savior from God. For the Lord will raise up from Levi someone as a
high-priest and from Judah someone as king. He will save all the
gentiles and the tribe of Israel. (Testament of Simeon 7.1-2)
To me [=Judah], God has given the kingship, and to him [=Levi], the
priesthood. And He has subjected the kingship to the priesthood. To me
He gave earthly matters and to Levi heavenly matters. As heaven is
superior to the earth, so is God's priesthood superior to the kingdom
on earth. [Testament of Judah 21.2-4a]
And in the Damascus Document.
[...] during the time of ungodliness until the appearance of the
Messiahs of Aaron and Israel [...] [Damascus document 12.23-13.1, emphasis added.]
I would say that John expected the Messiah ben David, the warrior king, to come first. The Greek word used for "another" in Matthew 11:3 is eteros which means "another of a different kind" or "the other of two." Jesus is not acting like a warrior king. Jesus is acting like the Messiah ben Levi, the healer. His reply to John in Luke 7:22 is that His works declare who He is.
Luke 7:21-22 "At that very time He cured many people of diseases and
afflictions and evil spirits; and He gave sight to many who were
blind.
Luk 7:22 And He answered and said to them, "Go and report to John what
you have seen and heard: the BLIND RECEIVE SIGHT, the lame walk, the
lepers are cleansed, and the deaf hear, the dead are raised up, the
POOR HAVE THE GOSPEL PREACHED TO THEM. [NASB]
He is pointing out to the disciples of John that He (Jesus) is doing the work of the Messiah ben Levi. He isn't saying that He isn't the Messiah ben David (in fact, many people call Him "son of David" in His ministry and He never corrects them), just that the time for Levi's ministry comes first.