This requires some knowledge of the cultural context. If you read the Old Testament, there is nothing obviously in there about a Messiah, as commonly understood in rabbinical judaism today. There are lots of proof texts, if you start digging into Psalms, Isaiah, and other passages, where if you already belive in a Messiah, you can say "the branch of Jesse" is a reference to Messiah, or "the seed of holiness" in Isaiah 6 is a reference to Messiah and the prophecy of seventy weeks in Daniel is a reference to Messiah, as is the stone that becomes a mountain, etc. Many other references. But if you just read those books with a blank slate view, nothing in them ties all these passages together as referring to the same man.
That process, of a growing awareness that there was a special man coming and all these different references from the branch of Jesse and seed of holiness, and stone of David, etc, all referred to this one man, was a belief that became popular in the intertestemental period.
During that time, a kind of Messiah-mania struck the region where people were going back over the scriptures and finding almost every verse as some reference to Messiah, re-interpreting the Psalms and the prophets in a new light. At the same time, a new genre of literature was created -- that of the Apocalyptic book. From the Book of the Watchers and Apocalypse of Weeks that form 1 Enoch, to Apocalypse of Zephanaiah, 2 Baruch, 2-3 Esdras, The Testament of Abraham, the Dead Sea Scroll War Scroll, and many others -- and these are just the ones that have been passed down to us. The Apocalypse of Christ to St John is the most famous example and in some sense is the culmination of this genre which began a few hundred years before christ and began to pick up rapid steam. Even the Essenes, responsible for the Dead Sea Scrolls, was a group that moved to the desert to await the coming of Messiah and was just one of many groups that began dropping out of society, forming communes, and waiting for Messiah to come. At the same time religious groups like the Zealots viewed the Messiah as a military leader who would throw off the yoke of Rome, and these groups of zealots were forming rapidly and growing as well.
So suffice it to say that Palestine by the time of Christ was abuzz with talk of a coming Messiah ushering in the end of the age. There were several people claiming to be the Messiah that came both before and after Christ, and these people gained large followings because everyone from the Pharisees to the ordinary man on the street believed that the Messiah was imminent. See the speech of Gamaliel in Acts 5.34-39 when the disciples of Christ were arrested:
But a Pharisee in the council named Gamaliel, a teacher of the law
held in honor by all the people, stood up and gave orders to put the
men outside for a little while. 35 And he said to them, “Men of
Israel, take care what you are about to do with these men. 36 For
before these days Theudas rose up, claiming to be somebody, and a
number of men, about four hundred, joined him. He was killed, and all
who followed him were dispersed and came to nothing. 37 After him
Judas the Galilean rose up in the days of the census and drew away
some of the people after him. He too perished, and all who followed
him were scattered. 38 So in the present case I tell you, keep away
from these men and let them alone, for if this plan or this
undertaking is of man, it will fail; 39 but if it is of God, you will
not be able to overthrow them. You might even be found opposing God!”
So they took his advice,
So once you understand this background context of the beliefs of people in that society, it's not at all suprising to see the Samaritan woman at the well express these commonly held views. Pretty much any person would have said the same thing. It also provides background context for the warnings of Christ in Mark 13.20
“If the Lord had not cut short those days, no one would survive. But
for the sake of the elect, whom he has chosen, he has shortened them.
At that time if anyone says to you, ‘Look, here is the Messiah!’ or,
‘Look, there he is!’ do not believe it. For false messiahs and false
prophets will appear and perform signs and wonders to deceive, if
possible, even the elect.