If sniffing becomes obsessive, appears alongside other sudden behavior changes, or cannot be interrupted, a veterinarian or qualified trainer can help rule out stress and improve manners. Otherwise, the moment is best understood for what it is. The dog is collecting scent information in the most efficient way it knows. People are still entitled to personal space, and a courteous owner should step in, but the behavior itself is neither mysterious nor shameful.
Children and guests should never be forced to tolerate contact that makes them uneasy. Creating a little distance, placing the dog on a leash during arrivals, and rewarding calm behavior can prevent embarrassment without frightening the animal. Clear boundaries and patient training allow dogs to follow human social rules while owners continue to respect the powerful instincts behind their curiosity.