Unless given a command to jump, a dog should never be allowed to jump on humans. A dog that jumps on humans of its own free will is a dog that does not respect the person it is jumping on. Even those cute little toy dogs should not be allowed to jump on people. While you may think it is cute, it is not cute to everyone else. Not only is it annoying to most people to have someone else's dog jump on them, it can also be dangerous. A jumping dog can knock people over, muddy their clothes, put runners in nylons and scratch the skin.
If a dog is stressed or afraid, their demeanor and typical behaviors will change. If you see this in your dog (or really any dog you know) you should step back and check on your dog. Are they hurt? Did a new dog come around they don’t know? Has the weather changed? Is it hot outside? When was the last time they had a chance to go outside to pee or poop?
Why do dogs jump up? A plausible explanation arises from their ways of communicating with each other. A puppy greeting an adult dog often licks the adult’s muzzle -- a polite, deferential behavior. Dogs, of course, descend from wolves, among whom muzzle-licking is how pups get the grownups to regurgitate food for them. Domestic dogs rarely nourish puppies this way, but muzzle-licking has survived, maybe because deferential behaviors are handy for a social animal. Think of humans saying “No, after you.” Muzzle-licking is also an appeasement behavior -- something you trot out to de-escalate a fight. A human might lift up his hands, palms toward the person he’s arguing with.