Matthew's Gospel is set mainly in the Roman province of Judea sometime between the years 28 and 33 CE (source xxviii). Who cares? Well, Jesus and his disciples lived and worked right smack in the middle of what are disputed Israeli and Palestinian territories today. Sadly, not much has changed since the 1st century: the people back then were pretty frustrated with their living situation, too.
The people of Judea were mostly Jewish and had been conquered and occupied by the mighty Roman Empire. This was no big deal to Rome—they had more important things to worry about than some insignificant Jewish province—but it was a huge issue for the people of Judea.
Many of them resented Roman rule. After all, the Romans had complete control over the land, laws, and government, and forced everyone to pay tons in taxes. The Jews were hoping (and praying) that God would send a messiah or "anointed one" to reclaim Jewish rule of Judea and to kick out the Roman occupiers.
For Christians, that messiah was Jesus. For other Jews…well, they were still waiting.
In 66 CE, about thirty years after the death of Jesus, everything came to a boiling point in Judea. A war broke out between the Jewish people and the mighty Roman Empire. But even though they were up against the most powerful army in the world, the rebel fighters were able to make a little headway. But, not for long.
In 70 CE, the Romans destroyed the temple. Remember the temple? Yeah, it's the center of Jewish religious, social, and political life. The Jews had fought long and hard to protect it from Roman influence, but in the end, they watched it burn to the ground while the Romans killed and plundered all throughout Jerusalem (source).
Matthew's Gospel is written in the aftermath of all this, probably sometime around 85 CE (source, 285). Not only is Christianity trying to take root throughout the Roman Empire, Judaism is also trying to figure out where it goes after this tragic defeat.
Enter the Pharisees. These guys had much more moderate views than other Jewish groups. If the Sadducees represented the far right wing and the Zealots (whom Matthew doesn't mention) represent the far left wing, then the Pharisees were right in the middle. They were also the dominant group that emerged after the war with Rome (source, 285).
The Pharisees wanted to help the Jewish people move into a new stage of life together, but to do this, they had to solidify what it meant to be a Jew. Promoting unity in the Jewish community helped the Jewish people thrive and survive in this difficult time. Unfortunately, this newfound emphasis on cohesive beliefs didn't work out too well for the up-and-coming Christians.
Though the followers of Jesus would have still considered themselves Jewish, the Pharisees did not. They rejected the idea that Jesus was the messiah they had been waiting for, so they had little tolerance for Christian ideas and theology. Christians were banned from the synagogues. They were called heretics and blasphemers. And, in the eyes of the orthodox Jews of the day, they were.
This is probably Matthew hates the Pharisees so much. He thinks they're hypocrites who've turned their back on God. But, from their point of view, they're just continuing to faithfully guide the religion that was handed down to them through the generations (source, 845).
Okay, that's all the historical stuff, but what about the actual places where Jesus lived and preached and died?
Matthew tells us that Jesus was born in Bethlehem. That's mainly because the Hebrew Bible says that the messiah will be born there (Micah 5:2). A nice Jewish writer like Matthew couldn't have his messiah born in Nazareth, even though that's where the Messiah's parents lived and where he would spend most of his life. No way. Mary and Joseph book to Bethlehem the first chance they get, and Jesus gets another notch in his belt.
Other travels in the beginning of the Gospel tend to fulfill biblical prophecies as well. Jesus heads to Egypt to escape Herod and there just happens to be a corresponding Bible verse to explain that. Then he returns to Nazareth and—guess what?—there's a prophecy for that, too. Go figure.
But Jesus spends most of his life in Nazareth, which is in the province of Galilee in Northern Israel. It's also where he begins his ministry. For the most part, his neighbors in Galilee don't seem so thrilled to have the Messiah living next door.
In his hometown, he's questioned pretty aggressively. Aren't you Mary and Joseph's kid? Didn't you used to eat paste in kindergarten? Jesus even has a hard time performing miracles there because the people are so skeptical. Jesus finally sighs and tells us, "Prophets are not without honor except in their own country and in their own house" (13:57). In other words, he's not exactly being hailed as a hometown hero while in Galilee.
When Jesus finally ventures down south to the capital city in Jerusalem, things don't go very well. The folks in Galilee occasionally get annoyed with him, but the religious authorities in Judea are completely enraged by his presence. While he's in town Jesus
So maybe that has something to do them not liking him.
Within a few days of Jesus arriving in town, the people in power are plotting to have him killed. They succeed and Jesus is put to death in Jerusalem. But wait a second—it's also where he rises again. Take that, Pharisees.