Everyone is aware that barking comes naturally to dogs. They bark to scare off strangers and predators and sometimes because they are scared too. However when a dog has a bone in its mouth it is more reluctant to bark in fear of losing the bone. Clever criminals are known to even throw bones at dogs in order to compromise their ability to bark and it has proved to be very effective. Through this allegory, our ancestors passed on the lesson that when one is confronted with the option of losing their prized possession it is very possible that they will act out of character in order to protect their interest. They may even go as far as endangering other interests in order to protect their treasure.
The proverb is used both as advise and to create an understanding as to why someone people will not act in their normal manner when their inner most desire is adversely affected. It is particularly useful when someone does not do what seems natural to them due to a greater desire to safeguard another interest.