Nothing is more aggravating than taking a dog on a walk and having to watch it pee on every single tree it passes by. Why is it dogs think it necessary to do this? If they have to go to the bathroom why not just get it all out in one go?
To a dog, pee is just a way of communicating. A lot of information can be passed in a little bit of urine. With just a little bit of a scent, other dogs will know what kind of dog it is, its age, and even the sex. This lets the other dogs know that this dog will frequent this area often and that if they want to make a friend or an enemy to come back to this spot some time in the future. Sometimes it can get as exact on how big the dog is or how tall.
The urine will also go bad after a while and other dogs are able to tell when the dog passed by. Whether it be a few minutes ago or even years.
They may do this to mark their territory, which can be very bad if its inside of a house. If you neuter your pet, the marking will decrease significantly. If this happens you’ll have to house train them and they’ll eventually stop this unwanted behaviour.
Both male and female dogs will do this and even puppies will start to mimic their parents at a very young age. It’s very natural to do and shouldn’t be discouraged as long as it is outside. This is just another way that the dogs make themselves comfortable.