Why do deer stop when they see headlights?
It's instinct, and it controls the deer until the deer's brain
has a chance to understand what a car's headlights means to the
deer, and what the deer should do about it. Often, the deer doesn't
get that time. The environment in which deer evolved did not have
cars with headlights. So unless a deer has had a chance to learn
about cars with headlights, it goes into the deer brain as "unknown
possible danger" (UPD). Before cars, the safest thing any animal
could do when faced with a UPD was to freeze. The is because the
UPD is likely to be a predator, and predators have trouble seeing
still objects while the most dangerous ones (wolves, big cats,
bears) react to retreating animals by chasing them. If the UPD
turns out to be a non-predator danger (fire, earthquake, falling
tree) what's the point of running away until the deer can figure
out which way to run? On the other hand, if the UPD turns out not
to be dangerous, or another deer that wants to horn in on whatever
the deer is eating, why waste energy running and giving up on
whatever objective the deer was following. The UPD might even be
something the deer wants to scare away--which they deer can do by
stamping their front feet at or by charging at a smaller
animal.
So evolution programmed in "freeze." when deer, squirrels and
even humans are faced with a UPD. When the deer (or squirrel or
human) has a chance to figure things out, it can use it's brain to
pick an appropriate course of action and override the instinctive
behavior. Unfortunately, cars can go faster than deer can figure
things out, so freezing isn't always so helpful. Makes the deer
seem stupid, huh.
But Deer aren't really that stupid. For example, you could train
a deer to run back the way it came every time it sees a car with
headlights, just like you can train a child to look both ways
before it crosses the street. But who's going to train every deer
in the world to do that?
It is also possible that the bright light of headlights
momentarily causes a deer to be unable to see. Deers have very poor
eyesight compared to humans even under ideal lighting
conditions.