The book is a combination of a relationship between a orphan dog named Merle and the writer, Ted Kerasote, and research on dogs psychology and physiology.
In the picture above of Bailey, you see his upper lip raise as he takes in the scents. The description of this from Merle's Door page 82 helped explain this too me.
"Over the years, as we walked nearly every valley in the Gros Ventre Mountains on the eastern side of Jackson Hole, I began to see why early peoples so valued their dogs. Many times, when I couldn't detect any breeze, not even with a lighter, Merle would come to a stop and step out from behind me. Raising his head to scent the air, he'd open his mouth, curl his upper lip, and half close his eyes. Nostrils dilating, he'd begin to wag his tail, indicating, "Elk."
What he was doing, particularly by opening his mouth and curling his upper lip, was facilitating the access of odors to his vomeronasal organ, which in dogs lies above the upper incisors.
Merle would also take several rapid sniffs as he diagnosed a batch of drifting air. Interspersed between his normal breathing, these sniffs would pass the air he was inhaling over a bony structure called the subethmoidal shelf and then across the lining of the nasal membranes. When Merle exhaled, these odor-packed molecules stayed in place, giving him an extra few moments to apprise their contents.