…All this leads to Caesarea Philippi and one of the pivotal moments in the gospel of Mark. The description of the coming periscope is oddly stated in the Greek, “into the villages of Caesarea Philippi.” Previously Mark had described it as a region (5:1, 17; 7:24, 31; 8:10). In any case, the region was twenty-five miles north of the Sea of Galilee. The area was built up by Herod Philip to serve as the capital of his tetrarchy. It is perhaps noteworthy that the region is two days’ journey away. It’s northern location likely served to separate Jesus and his disciples from the crowds that attended his every move earlier in the ministry.
As Lane  notes: “The capital was located at the source of the Jordan River on the slopes of Mount Hermon in a region famed for its beauty and fertility. When the area was first given to Herod the Great by Augustus he built a temple in honor of the emperor near a grotto consecrated to the Greek god Pan. In 3 B.C. Philip rebuilt the neighboring village of Paneas as his residence and named the new city in honor of Caesar. The area was thus dominated by strong Roman associations, and it may be theologically significant that Jesus’ dignity was first recognized in a region devoted to the affirmation that Caesar is lord.”
According to Harper’s Bible Dictionary, this city was known in antiquity as a shrine of the Greek and Roman nature god, Pan. It notes that sites of worship were likely outside in nature taking over places that had been dedicated to various Semitic deities and was possibly the location of Baal-gad or Baal-hermon of the OT (Josh 11:17 ff; Judg. 3:3; 1 Chr. 5:23). So it is perhaps intriguing that the questioning about and of Jesus takes place not in the synagogue (or a church), but out in the world, precisely in a place dedicated to a pagan god, with a name honoring the human Caesar (who was often presented as divine). As Stoffregen points out: “Where does our real confession take place? Certainly our confessions and statements about our faith in church are real — but, I think that it goes to a different level when we proclaim our faith in Jesus in the midst of [the world].”
That is the immediate context, but the scholar Pheme Perkins  draws out attention to a larger context:
“The first half of the Gospel has hinted at the coming death of Jesus (1:14; 3:6; 6:14–29), although the christological emphases in that section of the narrative fell on the power and authority of Jesus. However, discordant elements were introduced in the hostility of the Pharisees and scribes, the misunderstanding of the disciples, and the limits on Jesus’ healing power in the face of unbelief (6:6). In the first section of the narrative, Jesus apparently does not wish to be known as a miracle worker, but his commands to remain silent were regularly disobeyed (1:44–45; 5:19–20; 7:36–37). The portrayal of the disciples, however, raises questions about the suitability of a faith based on witnessing miracles. Although Peter and the others appear to have reached the correct insight that Jesus is Messiah, that confession will be misunderstood if suffering is not the central truth about Jesus’ identity. The second half of the Gospel, therefore, completes the initial confession that Jesus is Messiah and Son of God (1:1; 8:29; 9:7) with the threefold repetition of the passion predictions (8:31–32a; 9:30–31; 10:32–34)…. Since the disciples participate in the ministry of Jesus, they must also learn to share the suffering of the Son of Man. Each of the passion predictions is followed by an expression of disbelief, misunderstanding, or fear and then instruction on the necessity of suffering (8:34–38; 9:33–37; 10:35–45).”