You can gently let them know that this hurts you and you do not like it. Or be firm if they do not listen. Bears dig in trees for honey and scrounge the earth for food. The original food source of all animals is in the earth. Not in our refrigerators.
Humans store their treasures in houses and closets.
Animals use what nature gave them. So are they doing anything bad. Just what is natural. They will dig to bury bones or treats for later. Do not give them more than they need.