Dogs also lick because they like the taste of an owner's salty skin and out of habit.
Mostly, with domestic Dogs, it's a sign of affection.
Licking releases pleasurable endorphins which gives Dogs a feeling of comfort and pleasure like the feeling people get when they are biting their nails it relieves stress.