Urine on vertical surfaces disperses smell better. It's for communicating with other dogs.
Scent Messages
Leg lifting shows confidence and marks territory. Intact males do it most.
Dominance
Most male dogs start leg lifting around 6 months old when reaching sexual maturity.
Age
Neutered males tend to leg lift less frequently, but still use it communicate with dogs.
Neutering
Train your dog not to urine mark in the house. Praise outdoor peeing only.
Avoid Marking
Thoroughly clean indoor accidents with enzymatic cleaner to remove odors that attract marking.
Remove Smells
Block off furniture and household items you don't want leg lifted on.
Limit Access