Why do exit polls sometimes differ from the result?
An exit poll surveys voters immediately after voting, and it differs fundamentally from a pre-election poll: it asks about behaviour that has already happened rather than intention. That removes the largest source of error in ordinary polling — turnout modelling — which is why exit polls are usually far more accurate.
Why the UK exit poll is unusually good. The broadcasters' joint exit poll is not a national vote-share survey. It samples at a fixed set of polling stations, many used at successive elections, and measures the change in each station since last time. That change is then modelled onto every constituency to project seats, which is what actually matters in a first-past-the-post system. It has produced remarkably accurate seat projections, including calling results that contradicted every pre-election poll.
Where exit polls still go wrong:
Postal and early voters are not at polling stations. As postal voting has grown, this has become a significant gap requiring separate adjustment. In countries with extensive early voting, exit polling must be supplemented by telephone surveys of early voters, which reintroduces error.
Differential response. Supporters of some parties are more willing to be surveyed than others, and this bias is not stable between elections.
Misreporting. A small number of people do not answer honestly, particularly where a choice carries social stigma.
Sampling locations. A poll sampling unrepresentative stations inherits that error.
Modelling assumptions, particularly when translating votes into seats, which can break down if the relationship between vote share and seats shifts.
Historical failures include the 1992 UK general election, where polls and exit polling understated Conservative support, prompting substantial methodological reform, and the 2004 US presidential exit polls.
Note what an exit poll is not: early partial results are not exit polls, and neither are unofficial surveys posted during voting.