Only priests could eat the holy bread (see Exodus 25:22–30; Leviticus 24:5–9), and only within sacred areas.
kept themselves from women: The holy bread was for those who were ceremonially pure. The priest checked that David’s men were not ceremonially impure from sexual activity (see Leviticus 15:16–18). Normally, people who were not priests could not eat this bread. The priest made an exception because he saw the men's needs and believed they were on a royal mission.