So you think the priest should have refused them the shewbread at all cost.
I don't think that is the response GOD wanted.
In fact we hear Jesus confronting the legalistic Pharisees that wanted to condemn the disciples for reaping on the Sabbath (picking grain).
And Jesus brings up the story of David and the shewbread.
What I believe Jesus was trying to convey to them is that they wanted to look down upon the disciples for breaking the law on the Sabbath, while at the same time they highly revered David who also broke the law on the Sabbath.
I think the point was to show how inconsistent they were to revere so highly one hungry lawbreaker on the Sabbath but look down upon another hungry lawbreaker on the Sabbath.
i think that same principle of not being consistent was shown with the woman caught in adultery also, when He stated that he who was without sin should cast the first stone.
As Jesus also stated to the Pharisees ..... why do you insist others must be condemned for breaking the law when you break the law yourself.
Being a stickler for the law leaves you without mercy, and if you show no mercy to others then why should mercy be shown to you?
Two sides of the coin ---- law and mercy.
Just some thoughts on it.