dogs don't understand the concepts of 'naughty' v 'good' behaviour, they have desires and then assess if it is 'safe' to fulfill them
Of course no one is saying dogs have a moral compass. They don't really care if they pee in the house or in the garden, whether they sit or take food without asking, whether they sit on the sofa or their own bed and whether they chew furniture or their toys
They just react to instinct, stimuli and conditioning, there is nothing inherently good or bad about anything. It is us humans, who have them as part of our family, decide what behaviour we want and what we want to discourage, and condition them accordingly.
If a dog does not steal food, it is not because it understands any moral concept, it is because it is conditioned to wait for a signal before taking food. Similarly, a dog that does not dig in the garden, is not doing it for aesthetic reasons, but because of conditioning.
A dog who has a strong bond with their owner and looks up to them, will want to please, whether they get a treat or not. The key is to provide simple signals, and do so in a calm and consistent manner. There is a lot to be said for a pragmatic approach of rewarding good behaviour with a smile or quick caress and correcting undesirable behaviour similarly in a calm and unfussed way. OTT squealing with joy 'good boy', loads of treats are no substitute for calm leadership and bonding with the dog.
The positive reinforcement school has a lot to offer, but the gross simplification and a blindness to coupling it with any form of correction makes this shallow approach just a fad (maybe it is just an MN thing?). Hence when there are behaviours you cannot change, you say 'ignore it' or worse still, let the dog condition you to put the butter away as some of the posts suggested to the person having issues with a resource guarding, growling dog.
The suggestion there was to reward the dog, even if it continues growling and resource-guarding. That is just nonsense as it signals that growling is rewarded by treats. The fact that so many people are hanging on to that as the gospel is both scary and hilarious.