חז״ל fault יהונתן for this fiasco; they planned דוד's escape but not what to do after that:
What did אחימלך give דוד? How could he give him קדש? Everyone assumes that there was some פיקוח נפש involved; דוד hadn’t eaten in three days. But he should be given the “least אסור” food available.
רד״ק and מלבי״ם explain that the לחם קדש that he gave was לחמי תודה, the bread that went with a קרבן תודה, since that was permitted to a non-Cohen to eat if he was טהור. That’s the meaning of נשמרו הנערים אך מאשה; that they are completely טהור, not just from טומאת מת (not an unreasonable concern for a soldier), but even from טומאת קרי. דוד answers that not only has it been 3 days since they’ve been with a woman (that’s literally true in this case; דוד has been hiding in a field for 3 days), but that his people are “חברים” in the talmudic sense: they keep the laws of טהרה even for לחם חל. והוא דרך חל means that “we went on our way anticipating eating חל” but since we are are טהור, it will not be a problem that היום יקדש. They interpret לא היה שם לחם כי אם לחם הפנים as “there was no other bread besides the לחם הפנים”, so אחימלך gave them לחמי תודה.
Everyone else reads לא היה שם לחם כי אם לחם הפנים as implying that he gave him the לחם הפנים itself.
What was the לחם הפנים?
An עשרן is one tenth of an איפה (it’s also called an עומר), enough for an average person’s RDA. So 5 loaves of the לחם הפנים would be enough for 10 people.
So most קדש (whether a קרבן or תרומה) is אסור from the לא תעשה of זר לא יאכל. לחם הפנים is different in that the אסור is only in not fulfilling the עשה of והיתה לאהרן ולבניו ואכלהו. That is the meaning of והוא דרך חל; it’s almost חל, even though היום יקדש בכלי, this morning it may have been קדש.
We’ve mentioned דאג האדמי in the past; the Midrash identified him as the one who proposed David as the singer for Saul. It wasn’t presented as a good thing then; Doeg was the evil adviser who appears to be on the side of the king but is actually undermining everything from inside. Here we see the start of story that is the basis for that characterization.
אביר הרעים means “the mighty one of the shepherds”, but it would be odd for the תנ״ך to care about that. The Midrash, cited by רש״י, translates, אב בית דין, and says he was staying at the אוהל מועד לעסוק בתורה. The מלבי״ם says that he was known to be such a צדיק that David felt no need to to be circumspect around him.
But he will betray David and cause the destruction of all of Nob.
נחוץ is a hapax legomenon; presumably meaning “quickly”, as the targum: בבהילו.
אחימלך seems to view דוד's request with suspicion; אם אתה תקח לך קח certainly is not an expression of enthusiasm. The targum in fact translates אחרי האפוד not as “physically located behind the אפוד” but בתר דשאול באפודא, after he consulted with the אורים ותומים that were in the אפוד.
The irony is that this request shows דוד has lost some of his בתחון; it was about this very sword that he had earlier declared:
And that sword will get him into trouble very soon.