It's not just the headlights, but that might very well be the majority. There have been cases where I've had to stop for deer crossing the road at night, but they didn't look into my headlights and freeze, they just kept walking across the road. Also once I had a deer run out of the woods into the side of my car while I was driving.
I think they know cars are dangerous, but they don't perceive the speed and don't do a good job of extrapolating where the car will be. And why should they, they're deer. So they just bolt across the road knowing it's dangerous when a car is coming (hence why they're bolting) but often misjudge.