David came to Nob where Ahimelech was priest. Ahimelech was shaking in fear when he met David. "Why are you alone? Why is no one with you?" he asked.
References for 1 Samuel 21:1
David answered Ahimelech the priest, "The king has given me orders, but he instructed me, ‘Don't let anyone know anything about the mission I'm sending you on or about your orders.' As for my troops, I told them to meet me at an undisclosed location.
Now what do you have here with you? Give me five loaves of bread or whatever you can find."
"I don't have any regular bread on hand," the priest answered David, "just holy bread—but only if your troops have abstained from sexual activity."
"Definitely," David answered the priest. "Whenever I go out to war, women are off-limits; that's our standard operating procedure. Even on regular missions, the men's gear is kept holy. That's even more true today, with the mission holy along with the gear."
References for 1 Samuel 21:5
So the priest gave David holy bread, because there was no other bread except the bread of the presence, which is removed from the LORD's presence and replaced by warm bread as soon as it is taken away.
Now one of Saul's servants was there that day, detained in the LORD's presence. His name was Doeg. He was an Edomite and Saul's head shepherd.
David asked Ahimelech, "Do you have a spear or sword on hand? I didn't bring my sword or gear with me because the king's mission was urgent."