I have two theories in place:
1) Embarrassment
One candidate is controversial / unpopular. Respondents are unikelyunlikely to admit to a surveyor about their true preference. At a voting station, there is privacy and true preference will take place.
2) Determination
Supporters of the side that is slightly behind are more motivated to turnout and vote. As opposed to the leading side that may grow overconfident.
I'm not a doctor, not a lawyer, not an investment advisors, just some theories, common sense and critical thinking.
EDIT / UPDATE: I wrote about two matters that I've discussed with my wife. No sources, no references, just pure intentions and sharing our experiences. It could be improved... I could spent endless research, references, sources... I'm at the source, one of my domains is "mostly doing" because I've learnt that talking about stuff doesn't move the needle.