David said to Ahimelech the priest, The king has commanded me a business, and has said to me, Let no man know anything of the business about which I send you, and what I have commanded you: and I have appointed the young men to such and such a place.
The mention of Doeg, an Edomite who had risen high in Saul’s government (1 Samuel 21:7), prepares the reader for his informing Saul about what happened at Nob (1 Samuel 22:9-19). Perhaps Doeg was "detained before the Lord" because he had come to the tabernacle to present an offering or to conduct some other business there.