The scene: David flees Israelite territory. King Saul is trying to kill him, no matter how much David tries to prove his bona fides.
David + 600 soldiers (w/ families) take shelter with Philistine King Achish of Gath - pagans the Israelites hate.
Next is war between Israelites & Philistines. David & company accompany Achish en route to battle.
Achish's generals voice doubts over David's loyalty. Naive Achish still trusts.
David pretends innocence. Asks if Achish has any evidence of betrayal.
On generals' insistence, David is sent back.
He attacks other Philistine clans while Achish fights Israelites.
Achish wins war. Israelite king Saul (who had persecuted David) commits suicide.
But David laments Saul's death.
The generals were right.
Later, David assumes Israelite kingship.
He does not repay the political sanctuary he was given as a refugee.
Does not make peace with Philistines & become a good neighbor.
Instead, David consolidates & makes war on Philistines to prove worthiness.
Note how #Rohingya refugees in India immediately bombed the holiest Buddhist sites in Bihar.
They aided Cuckmiri jihadi attacks on Indian security forces in Jammu.
This comes from the same mentality outlined above.
Understanding this mindset also impacts vetting & cultural assimilation for recruitment into security & admin apparatus.
We see fruits of special drives to recruit Indian #Muslims into services - repeated instances of religious bias & zealotry. Sometimes complete treason.