This behavior comes from canine social instinct. Dogs use scent to learn about each other, and because they see humans as part of their social world, they often treat people the same way. That is why they may become even more interested when someone is stressed, sick, pregnant, or otherwise giving off a different scent than usual.