Here's an interesting read:
Living with humans has taught dogs morals, say scientists | Mail Online
It makes sense too. Dogs that live with humans seem to be more well behaved than strays, wolves, etc. I guess that seems like it would be a given but this article explains some things you might not have thought about.
For example, dogs in the wild are generally more aggressive even with dogs they know than dogs in captivity. They don't seem to mind being "pets" either. They learn "social rules" and tend to abide by them.