Dogs poop standing up because they are born with this habit. Dogs are social animals and when in the wild, they mark their territory with excrement to indicate their presence. When dogs poop while standing, their bodies will relax and their tails will wave. This is a signal that they are marking their territory. Dogs at home will still retain this habit, but because they have their owners to take care of them, they will not look for their own territory like dogs in the wild.
If you find that your dog often poops while standing, then you can try to train it to sit down and poop. . This allows them to learn new behaviors and makes it easier for you to clean up their waste.