
Dogs
don't know 'right' and 'wrong'. Those are human definitions.
Dogs can sense mood, and will cower if people are angry (though they have no idea of the reasoning behind the anger), in an attempt at appeasement.
Many people wrongly interpret this as 'guilt', then punish the poor dog anyway. Next time the dog cowers and grovels even more ... :(