In essence, domestication of dogs arrested their development compared to wild animals and made dogs remain in the puppy-like state. Dogs keep a number of behaviors throughout their lives that wild animals lose as they mature. For example, wild animals are usually afraid and suspicious of strangers. Many dog breeds are very friendly and approach strangers first. Wild animals also usually fight for leadership while dogs accept humans as leaders without challenging them.
To really see things the way they look for your dog, you’d need a new nose because, unlike humans, dogs rely extensively on their sense of smell when interpreting the surroundings and things that happen around them. They may smell another animal having passed through a few hours ago or even one of your guests releasing too much of a stress hormone while talking to you.
Compared to humans, dogs have a limited sense of sight. It is blurred and dogs can only recognize a limited number of colors. They can identify motion of an object much better than visually see its particulars. The hearing abilities of your dog are also very different from yours. Humans mostly focus on other human voices, while dogs hear higher frequencies and more subtle sounds.
Just like people, dogs can act out when they feel misunderstood or need something. As described before, your dog may be acting because it sensed something you didn’t. If you think that your dog’s behavior comes from spite, then you’ll see all the actions of your dog through this prism, even though dogs don’t have an emotion called spite.
Another thing that dogs and people have in common is motivation by getting attention. However, dogs often can’t differentiate positive attention from negative attention, which is why they will often repeat behavior that gets attention even when the attention is negative.