My mother-in-law stumped me with this question. Why did God allow David to eat the bread which was lawful only for the priests, but condemn Saul for offering a sacrifice, which also was lawful only for the priests? I'm thinking it may have to do with the priest giving permission to David, whereas Saul had the previous examples from Moses' day of disastrous consequences for taking on a priestly role in offerings to God.
I guess I see the cases being different: Saul was basically impersonating a priest, not acting out of faith, while David's actions seem more innocent. He was not making an offering, just eating leftovers.
We all struggle with the relationship between law and grace. I know I do, and I bet just about every Christ-follower has to work through these things at some point. Hopefully this helps!