Why do dogs often go up to another and?

smell there behinds so much? I can sort of understand why many cattle do it to see if they are in heat or not but dogs will sniff away. They will check both female and males do this to each other. Is there some kind of odor that is emanated?
3 answers 3