Not only do dogs sniff and smell things out of curiosity, they taste and paw at Dogs learn a lot about each other by sniffing and licking the genitals of other dogs.
It could be as a way to clean the other dog's privates, as that is something. Why does my dog keep licking my other male dogs penis to the point he will wind to.
And why does your dog have a fascination with other dogs' private parts? Let's answer a (That's the furry area you thought was a dog's penis in more innocent times.) What's Up With Dogs Licking Other Dogs' Privates?.