1 Samuel 27 has David accepting the fact that although he may have been anointed to be king, it wasn’t yet his time. David approaches his situation this way: “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”. David decides that running is getting old, so he decides to move to the land of the Philistines because Saul won’t chase him there. David came with 600 men and asks Achish, king of Gath, if he can live in the land.
The king agrees and David moves there with his two wives and his men. And his hunch was right, Saul “no longer sought him”. David asks the king to give him a country town to be his own, rather than live in the “royal city with you”. David has an ulterior motive – to get away from the king of Gath so he could create a little wealth of his own.
David did that by making raids against the people in the surrounding territory. But there was some deceit in his method. He and his men would go out and kill all the men and women in an area and “take away the sheep, the oxen, the donkeys, the camels, and the garments, and come back” with his plunder. He made it appear that he was attacking the people of Israel, but in fact he was attacking other people. The king would ask with each return whom David had raided that day, and David gave a false report.
So the king was pleased to have David in his land, because he thought David was making himself an enemy to the people of Israel by his raids. In fact, it was other people but since David killed them all there were no reports to let the king know truth. It is quite a plan and allowed David to live in peace in the land while he pulled the wool over the eyes of Achish the king of Gath.