The men sampled their provisions, and didn't ask counsel from the mouth of Yahweh.
TSK
TSK · 1 Samuel 23:2
Treasury of Scripture Knowledge references in WEB.
Therefore they asked of Yahweh further, "Is there yet a man to come here?" Yahweh answered, "Behold, he has hidden himself among the baggage."
Then David inquired of Yahweh yet again. Yahweh answered him, and said, "Arise, go down to Keilah; for I will deliver the Philistines into your hand."
David knew that Saul was devising mischief against him; and he said to Abiathar the priest, "Bring the ephod here."
David inquired of Yahweh, saying, "Shall I go up against the Philistines? Will you deliver them into my hand?" Yahweh said to David, "Go up; for I will certainly deliver the Philistines into your hand."
David inquired of God, saying, "Shall I go up against the Philistines? Will you deliver them into my hand?" Yahweh said to him, "Go up; for I will deliver them into your hand."
Trust in Yahweh with all your heart, and don't lean on your own understanding.