David fled from Saul, and came to Nob, to Ahimelech the priest. David said that the king had sent him on business and that he needed five loaves of bread for his men. Ahimelech said that he had no common bread, only holy bread, but that if the men had abstained from sex, they could have it. David corroborated that the men had abstained for at least three days, and that their vessels were clean. The priest gave them the bread and they ate. David further asked for a weapon, saying that he had to leave in haste and did not have time to get his own weapon. The priest offered him the sword of Goliath, whom he had killed. David took it. There was one of the servants of Saul, his chief herdsman named Doeg, at the priests home that day.
David was on the run from Saul, and came to the home of Ahimelech looking for assistance. He got bread and a weapon and went his way. David was well-respected and loved by the people of Israel, and this was just one example of how the people assisted him during his flight from Saul. David had the favor of the Lord upon his life, the anointing of the Lord. It was his way to not attack or speak ill of Saul. This was a powerful example of trusting God until He brings you into your place of blessing. Wait on the Lord and do not shoot those who may appear to be in your way. God will elevate you in His time. Trust Him!