At a distant point in their evolutionary past, dogs were pack animals, and since then, they have been carefully bred for their ability to assist people, so knowing their position in the hierarchy is ingrained deep within the dog psyche. Dogs don’t like democracy. They want a society with a strong leader, and if there isn’t one, they’ll step into the role. Many pet owners, especially new ones, don’t set up consistent rules, correct unwanted behavior, or discipline their pet. Maybe it’s a way of being “nice,” or maybe they think doggy misbehavior is “cute.” No matter the reasons, it can send the message that the dog is in charge.
A dog thinking of itself as the leader of a family/pack can have disastrous consequences—they won’t listen to your commands, and might even attack you if they perceive you as getting out of line, just like they would attack another dog in a pack. If your dog growls at you when you go near its food or toys, or doesn’t listen to your commands, it could be that you haven’t established yourself as its master.