Then David said in his heart, “Now I shall perish one day by the hand of Saul. There is nothing better for me than that I should escape to the land of the Philistines. Then Saul will despair of seeking me any longer within the borders of Israel, and I shall escape out of his hand.” So David arose and went over, he and the six hundred men who were with him, to Achish the son of Maoch, king of Gath. And David lived with Achish at Gath, he and his men, every man with his household, and David with his two wives, Ahinoam of Jezreel, and Abigail of Carmel, Nabal’s widow. And when it was told Saul that David had fled to Gath, he no longer sought him. 1 Samuel 27:1-4.
Even though God has delivered David over and over from Saul, he us weary of running from him. So he seeks refuge with his old enemy, the Philistines. Since the Philistines would rather make peace with him than fight him, they give him shelter at Ziklag.
This division between Saul and David keeps them from controlling the land God gave to Israel. The church is like this. When we are more friends with the world than each other, we have compromised our mission.