David went to the Philistine city of Gath to escape from Saul. But the people there thought they recognized him as a notorious Philistine slaughterer. So David pretended he was insane, and then he ran away and hid in a cave.
Then he went into a city and fought the Philistines who were attacking it. But God told him that Saul was coming, and that the people of the city would hand him over to Saul to keep him from destroying their city. So David left the city, and what God predicted didn’t happen.
David sneaked up on Saul while he was relieving himself. Someone with David pointed out that his enemy was vulnerable, but David didn’t want to harm the Lord’s anointed. So he just stole a piece of Saul’s robe. Then he showed it to him to prove that he wasn’t trying to kill him. So Saul decided not to kill David until later.
Later, David sneaked up on Saul while he was sleeping. Someone with David pointed out that his enemy was vulnerable, but David didn’t want to harm the Lord’s anointed. So he just stole Saul’s spear and water jug. Then showed them to him to prove that he wasn’t trying to kill him. So Saul decided to stop trying to kill David.
But David wasn’t convinced that he would be safe with Saul. So he decided to go back to Gath and live in the holy land of the Philistines, who thought he was a Philistine-slaughtering madman.
David kept going out and slaughtering his foreign enemies and stealing their property. He completely exterminated the Amalekites, who had already been exterminated by Saul and Samuel. But he told the king of Gath that he was slaughtering Israelites. The king liked that. He wanted David to join him when he went to war against Israel, and David was eager to help.
But the Philistine commanders didn’t trust the Philistine-slaughtering madman for some reason. So David wasn’t allowed to fight against his own people. (He didn’t get to do that until after he became king of Israel.) So instead of slaughtering the Israelites, David had to be content with slaughtering the dead Amalekites again.
The moral of the story
People will like you and trust you if you act like you’re crazy, lie to them, and steal from them.