Haven't you read in the Law of Moses that the priests are allowed to work in the temple on the Sabbath? But no one says that they are guilty of breaking the law of the Sabbath.
It was during the time of Abiathar the high priest. David went into the house of God and ate the sacred loaves of bread that only priests are allowed to eat. He also gave some to his followers.”
He went into the house of God and took the sacred loaves of bread that only priests were supposed to eat. He not only ate some himself, but even gave some to his followers.”
The only bread the priest had was the sacred bread that he had taken from the place of worship after putting out the fresh loaves. So he gave it to David.