Then David came to Nob, to Ahimelech the priest. And Ahimelech came to meet David, trembling, and said to him, “Why are you alone, and no one with you?” And David said to Ahimelech the priest, “The king has charged me with a matter and said to me, ‘Let no one know anything of the matter about which I send you, and with which I have charged you.’ I have made an appointment with the young men for such and such a place. Now then, what do you have on hand? Give me five loaves of bread, or whatever is here.” And the priest answered David, “I have no common bread on hand, but there is holy bread—if the young men have kept themselves from women.” And David answered the priest, “Truly women have been kept from us as always when I go on an expedition. The vessels of the young men are holy even when it is an ordinary journey. How much more today will their vessels be holy?” So the priest gave him the holy bread, for there was no bread there but the bread of the Presence, which is removed from before the Lord, to be replaced by hot bread on the day it is taken away. 1 Samuel 21:1-6.
The priest is willing to break with tradition to feed a hungry man, but he does not make this distribution lightly. The men should at least keep themselves from sexual relations as an acknowledgement of the sanctified nature of this bread.
This was not a matter of obeying a specific law so much, but being mindful of God’s presence. And God is always present with us. As gods priests, those of us who believe extend our awareness of God’s presence by declaring it to those who do not believe.