Thank you, this is an interesting question to consider. I will attempt to respond, though it isn’t something I have previously thought much about. I would be interested to hear what your thoughts have been too.
It seems clear from the Scriptural evidence that the members of the Tribe of Levi were exclusively given to look after the holy elements of the Temple, including the Bread of Presence and carrying the Ark of the Covenant (Ex 25:10-30; Deut 10:8). The penalty for anyone who touched the ark (including Levites) was death (Num 4:1-15, esp. vs. 15). In 2 Samuel 6:6 we read that Uzzah touched the ark, because the oxen stumbled, and was killed immediately. So we conclude: touching the Ark is an act in contravention of a direct command from the LORD, the result being death.
However, the situation with the Bread of the Presence does seem to be different. In Numbers 4 the Kohathites are given responsibility of the Bread (see also Lev 24:5-9). While it was technically unlawful for David and his men to eat the Bread, as the Levites are to eat the bread before new bread is presented, there doesn’t seem to be a a clear punitive consequence outlined (so far as I can see; cf. 1 Samuel 21:1-6 for the story of David and his men). Regardless if there is a punitive element or not in the OT Law, Jesus provides an interesting and authoritative interpretation of these events that should act as our interpretive standard. A paraphrased summary of Jesus’ response: Yes, David and his men ate the bread which was not lawful to do, but don’t you see: this is the proof that the Law is designed for man’s benefit, not his ill, and I am the Lord of the Sabbath (Matthew 12// Mark 2).
My summary: there appears to be a distinction between the two acts, with a clear capital punishment outlined wrt touching the Ark, and no like punishment given for violation of the ceremonial rites of the Bread. In any case, Jesus upgrades our understanding of and insight into David’s situation: God’s law prioritised their need over blind obedience to the command, because the Law is designed for humanity’s benefit.
I hope that helps you. Please do send through your thoughts if you would like.
All the best,