Dogs are social animals and see their family as a pack, so they’re happy to see you because you're part of the pack. Dogs wag their tail when they are happy, so it's common to be greeted by a wagging tailed puppy.