So David had killed Goliath, served the king, commanded armies and was anointed to a future king of Israel. Then there was this a humbling experience: he was reduced to feigning madness to stay alive.
He’d escaped Saul, but those serving King Achish of Gath were nervous about him, with good reason:
1 Samuel 21:11 Isn’t this David, the king of the land? Isn’t he the one the people honor with dances, singing,
‘Saul has killed his thousands,
and David his ten thousands’?
This future king of Israel found himself scratching on doors and drooling down his beard. We can assume this a general perception of how madness presented itself at the time. Any pride would have disappeared about then. There was no royal welcome for David.
It worked, but only partly. They didn’t kill David, but they didn’t want him around either:
1 Samuel 21:14-15 Finally, King Achish said to his men, ‘Must you bring me a madman? We already have enough of them around here! Why should I let someone like this be my guest?’
After this, David ‘escaped’ to the cave of Adullam. We don’t know whether he had to flee for his life, or whether the people of Gath sent him packing.