How people perceive things and how dogs do are completely different. People possess rational thought and dogs DO NOT. Dogs act on instinct and they learn through association. They do not possess the ability to reason. Contrary to popular belief, a dog can never be spiteful.
For example, I left so my dog got mad and chewed up my shoe. That is how people think and not dogs. Most unwanted behavior is displaying some form of dog anxiety or frustration.
What is the dog actually thinking when you leave your house? After you leave, the dog will go look for you. How do they look for you? By scent. What smells like you the most? Your shoes, dirty laundry, blankets, etc. Shoes carry your strongest scent as we do not wash them. As the dog goes around looking for you he picks up your scent and when he finds the shoe is not you anxiety kicks in. What is in front of him when the anxiety kicks in? The Shoe. How does a dog release anxiety? They chew.
Therefore, the result of this action is anxiety and not spite.
The mildest form of anxiety is a dog compulsively barking and whining. This stage can lead into worse stages of anxiety.
The most severe form of separation anxiety is when the dog urinates and / or defecates in the house when you leave. Did you ever hear the expression “ I got so scared I peed my pants “? Well this is the emotional state of your dog. At this level they cannot control their faculties. The only exception to this is when a dog is marking territory. This usually occurs with dogs that are Not spayed or neutered and they are leaving their scent to attract other dogs.
In the case, when you have had your dog for some time and he is potty trained and out of the blue he starts to urinate in the house; this is most likely is a medical issue like a urinary tract infection and you should seek medical attention for your dog.
The good news is that all forms of anxiety can be rehabilitated providing both you and your dog a happier life.