I had some of that action not long ago. I was on a hog hunt watching a spot where the hogs were crossing under a fence. Sitting on a folding stool behind a handy bush. A friend was in a treestand just 50 yards down the fence line and he saw the whole thing.
I was sitting there when I heard something critter-ish walking upbehind me. Naturally, I froze thinking it was a hog heading for the crossing. Then - wheeze, stomp, wheeze, stomp. Aw, frack! A deer. CLOSE deer. Every stompsent ajolt upthe stool I was on. This went ona couple of minutes before it quitand I heard steps leaving. Turned around to see a doe and fawn walking off into the woods.
My buddy said she was practically sniffing the back of my neck, not two yards away. And no, I wasn't wearingany non-stink suit ofcarbon clothes.

A pretty stout breeze was coming directly over my left shoulder.
When they see something they're not sure about, I think they go through that routine to see if they can make it move. If it moves, then they know it's something they don't like.