Moses told Aaron and his sons, “You are to boil the meat at the entrance to the Tent of Meeting, and then eat it there with the bread that is in the basket of offerings for the ordination, as I ordered: ‘It is for Aaron and his sons to eat.’
“He went into God's house when Abiathar was high priest, and ate the consecrated bread which no one except the priests are permitted to eat, and gave it to his men too.”
How he went into the house of God and took the consecrated bread? He ate it, and gave it to his men too. That's not permitted either. The consecrated bread is only for the priests.”
So the priest gave him the holy bread as they didn't have any other bread there except this “Bread of the Presence,” which had been removed from the presence of the Lord that day and replaced with fresh bread.