Dogs learn very quickly the difference between what is safe and what is unsafe. For example, a dog knows that the last time he peed on the carpet, he was hit with a newspaper when his owner came home. So when the dog pees on the carpet again, he sulks when his owner comes home, expecting to be punished again. And most likely, the dog is not peeing inside because he is naughty, but because he has not been taught where to pee (outside!). Similarly, a dog might growl because he is sore and was touched on a sensitive area—and not necessarily because he wants to assert himself as the ruler of your home.
Of course, these are just our human interpretations of what a dog is thinking; in reality, we have no way of knowing what he is thinking! I love to speculate about why a dog might be behaving a particular way, but the fact is that our interpretations of what the dog might be thinking are not very helpful in modifying its behavior. What is useful, though, is careful observation of the dog’s actual behavior (and the context or situation that led to that behavior).