I enjoyed this Slate article about dog brains. The bottom line? Dogs just aren't as human as you think they are. When you attribute human emotions and (especially) motives to dogs, you're probably wrong.
The problem is we try to understand canine behavior the same way we understand human behavior: we try to put ourselves in the shoes of whoever we're trying to understand, and then imagine what we'd do. That means we're employing a theory of mind -- which is all well and good, until you do it with a critter that doesn't have a mind (yes, it has a brain, but that ain't the same thing), or at least not a mind much like ours.
And the problem goes deeper, though the author doesn't put it exactly this way. We don't merely apply a theory of mind to understand dogs; we implicitly assume dogs, too, have a theory of mind that they use to understand us. If you think your dog is peeing on the couch to punish you for leaving it alone too much, you're not just assuming the dog feels anger in the same way we do (already questionable). You're also attributing to the dog the notion of punishment, which means considering how its actions might motivate a change in your behavior. So in your theory of the dog's mind, you're including a model of your own mind. A meta-theory of mind, if you will.
Anyone planning to leave me an indignant comment about how human your dog is, how you really understand each other, etc. -- please read the article first. (And for the record, I love dogs. Most of 'em, anyway.)