Especially male dogs, who are more territorial, hike their legs to urinate because it gets their scent to nose level of other dogs. I read this in a book, I can't remember what it was called, about weird little things that dogs do. It was something like Why does my Dog Drink Out of the Toilet? Kind of thing.