Governing parties lose by-elections. Not always, and far more often than they win them, and the pattern holds across administrations of every colour and every level of popularity. It is structural rather than a verdict on any particular government.
How consistent is the pattern?
Very. Across the post war period, governments have suffered swings against them at the large majority of by-elections, and gains by a governing party from an opposition party are genuinely rare events.
The pattern is strongest in mid term and weakens as a general election approaches, which is the clearest evidence that it reflects the electoral cycle rather than a settled judgement on the government.
Why does it happen?
Four mechanisms operating together, and none of them requires anyone to have changed their mind permanently.
Differential turnout, where government supporters stay at home while opponents turn out. Protest voting, where people register dissatisfaction knowing it will not change the government. Tactical consolidation, where opposition voters unite behind the best placed challenger. And the accumulated grievances of any government in office, which are always more numerous than they were on election day.
Which matters most?
Turnout, on most analysis. A government does not need to lose voters to lose a by-election; it needs its voters to stay at home while its opponents turn out. The result looks like a collapse in support and frequently is not.
Comparing raw vote numbers rather than percentages is instructive. The governing party vote often falls far more in absolute terms than the winner vote rises, which indicates abstention rather than switching.
What is the free hit effect?
The recognition among voters that a by-election carries no risk. Somebody who intends to vote for the government at the next general election can vote against it in a by-election without any consequence for who runs the country.
Campaigns exploit this explicitly, arguing that a vote is a message rather than a choice of government. It is an argument only available in a by-election.
Do governments ever gain seats?
Occasionally, and it is treated as remarkable when it happens. A governing party gaining a seat from the opposition at a by-election is unusual enough that each instance is cited for years afterwards.
It generally requires a very strong government position, a weak or divided opposition, or highly unusual local circumstances.
Does the cause of the vacancy matter?
Considerably. A by-election caused by the death of a well regarded member behaves differently from one caused by a scandal, a recall petition or a defection.
Where the previous member left in disgrace, the governing party faces a campaign about its own conduct as well as the ordinary mid term difficulties, and swings in those contests have been among the largest recorded.
What does a loss actually signal?
Less than the coverage implies, and not nothing. A single by-election loss in mid term is close to the expected outcome and signals very little. A pattern of large swings across several contests in different regions is more meaningful.
The useful questions are whether the swing exceeds the historical mid term average, whether it is consistent across different types of seat, and whether the government vote fell or simply failed to turn out.
How should a governing party respond?
The standard response is to describe the result as a mid term protest, which is usually accurate and universally disbelieved. The standard opposition response is to describe it as a verdict on the government, which is usually an overstatement.
Both claims are made after every by-election regardless of the numbers, which is why reading the turnout figure and the historical comparison is more informative than reading either party reaction.
Does the same apply in devolved elections?
Broadly, and with an added complication. In Scotland and Wales, voters may be responding to the record of the devolved government, the United Kingdom government, or both, and disentangling which is genuinely difficult.
The same pattern of mid term losses for incumbents appears, and it applies to whichever party is in office in the relevant institution rather than only to the government at Westminster.