In fact, even if the dog does not appear guilty, owners still feel the need to punish the animal at that point. And still, despite such punishment and the dog's apparent knowledge of its wrongdoing, these problems continue to recur. First of all, we can only speculate as to whether the animal actually appears guilty because of some knowledge of a wrongdoing on its part. However, it's usually only upon the owner's arrival that the dog begins to appear this way, not before. If one is to surmise anything about the situation, it is that the dog is behaving fearfully upon the owner's arrival in anticipation of punishment when some damage is found.
Timing is critical in effectively disciplining a problem behavior.
The desired effect is as if unexpectedly a bomb burst, and you jumped in fright and were stopped from doing what you were previously doing. It usually only takes several occasions for the animal to learn to avoid engaging in that particular behavior as a way to avoid the discipline. Punishing cats for soiling outside their litterboxes and then putting them in the litterbox is something that is commonly done. There the fear that the cat is experiencing during the punishment becomes inadvertently associated with the litterbox. Now they want to avoid the litterbox.