Smaller dogs tend to do that, albeit not to that extent. It is in effort to mark their territory higher up, thereby giving other dogs the impression that the territory belongs to that of a larger dog. My beagle does it.