Licking is a natural behavior that dogs learn from puppyhood. Dogs cannot talk but they have an effective way of showing their affection to people they like. In order to communicate; a dog will lick other dogs and also humans. A mother dog licks the puppies clean. Mother dogs would lick the puppies not only to show affection but to stimulate defecation and urination.
Dog owners are often perplexed at the habit of the pet to lick the anal area. Dogs that lick their butts have other reasons as certainly this habit is not done to show affection. Dog owners will be amused to see the efforts of a dog that is trying to lick the rear end. However, it would not be amusing if the dog that was seen licking the butt would lick the master’s face to show its affection.
A mother dog will lick the puppy after it has urinated or defecated. The behavior to lick was learned by dogs from puppyhood. Dogs use their long raspy tongue for grooming purposes. Humans shake hands – dogs sniff each other’s butts. The butt licking behavior can be the dog’s way of ensuring that the rear end is free from dried feces and from the smell of the feces as well. Dogs have the predilection for anything that humans find horrible. Dogs love to eat feces and to roll in rotting animals. The butt licking habit is a part of the dog’s predilection for smelly things we humans find repulsive.
http://indirekt.si/what-makes-a-dog-lick-the-anal-area