Because their legs are too small!
Yep, pretty simple hey? See evolutionary wise dogs are all about the nose. They live to smell and understand the world. They can sort chemicals beyond human understanding with basically a similar resolution that we see the colour spectrum. They have noses that are 10,000 times more sensitive than the human nose (the combined value of their larger brain space for processing smells and having 40 times more nose sensors, and different sensors than humans.
You will usually see dogs sniffing each other’s butts, and that’s because that’s where the scent gland is. They are not sniffing poo, they are sniffing the very strong and complex individual signature smell of the dog from their anal gland liquid that is squeezed out of the butt of the dog.
Dogs will also sniff another dogs genitals or any other interesting part that smells that they can gain useful information from. Its far more complex and honest than most human interactions.
JUMPING UP on a human is the dogs attempt to smell our faces. A dog will often try and smell our butts like they do dogs, but we don’t have anal glands to give them the pertinent information. So the next option is another hole of ours that leaks scents. Dogs will sniff other dogs faces (after having smelled their butt) and with humans they want to do the same. But because humans are so tall when they are standing up, the dog feels like it has to stand up too. it needs to climb us or get us to bend over so it can smell us.
Some dogs also are submissive and like to give our faces a lick, just like the do other dogs in the pack to let them know there is no threat.
A dominant dog may also jump on a human to let them know they are in charge. Ever had a barking high energy dog put its paws on you as part of ‘play’ well that might seem like play, but any contact like this is similar to a dog putting its head on top of another dog. It shows that they want domination. Not in a bad way per say, unless you are the owner, then they are unlikely to listen to you seriously if you can’t stop this kind of domination of yourself.