My opinion: long mammals like cows, horses, camels, etc can't reach their behinds with their limbs. They can use their head (especially when the tail doesn't reach the fronter part of the behind), but it's not efficient because their head is heavy (and they're heavy animals in general) and has more inertia. Therefore, a tail is their swift efficient defense for the behind. By contrast, smaller mammals like cats, dogs…
Showing someone (or another dog) that you're excited or scared ("tail between his legs") is a very potent social mechanism I think. I don't think it adds much to the motor skills of the dog, besides maybe giving it a tool to keep flies and insects away from the ol' pooper.
It's also a very subtle tool for social interaction as you note - the difference between tail wagging whilst up, horizontal and down, or wagging just the tip and so on. There's quite a lot of complexity hiding there.