Okay, so here’s my theory.
You know how when you get up in the morning, you head for the bathroom and make use of the toilet. After flushing, you wash your hands and then stop at the mirror. You look at yourself, maybe make a face or two, inspect your teeth and run your hands through your hair before leaving. I think it’s a way of reminding ourselves “oh, yeah. That’s me.”
Have you noticed that dogs do the same thing? They head out in the morning, do their business, then turn around and give it a good long sniff.
I think this is their way of looking in the mirror first thing in the morning to remember who they are.