Why Dogs Mark Their Territory.
Dogs use their urine (and sometimes feces) to mark areas they consider to be theirs.
Marking their territory lets other Dogs know that they are present.
Dogs who aren't fixed (spayed or neutered) are more likely to mark than those who are fixed.