A UK by-election happens when a seat needs to be filled in the House of Commons and a new Member of Parliament (MP) elected.
By-elections for Westminster occur when:-
There may be personal reasons, as with Louise Mensch who gave up the Corby seat for family reasons.
There may be work commitments or opportunities that would need a full time commitment. For example, David Miliband who decided to join a US charity.
MPs have also left to contest positions as Mayors of large cities and as Police and Crime Commissioners.
Some MPs leave for other opportunities, perhaps caused by disillusionment, or because they just don’t want to do the job anymore. For example, Tristram Hunt left the House of Commons to take charge of the Victoria and Albert Museum.
Some MPs have resigned because of criminal proceedings, as with Chris Huhne who pleaded guilty to perverting the course of justice over a speeding offence, and the House of Commons does have the power to expel an MP for a serious misdemeanour.
MPs may change parties but there is no requirement to resign and fight a by-election.
However, a few have, for example, Douglas Carswell and Mark Reckless in 2014, as part of a UKIP strategy of raising the party’s profile through by-elections, and Bruce Douglas-Mann who resigned on leaving Labour to join the Social Democrat Party in 1982.
In two cases MPs have resigned and fought a by-election on a matter of principle; the Conservative MP David Davis fought a by-election on the erosion of civil liberties and Dick Taverne left Labour because of disagreements with his local party over Europe in 1973.
MPs may be given a peerage and go to the House of Lords which disqualifies them from being an MP. This happened with Betty Boothroyd when she retired as Speaker of the House of Commons.
By-elections are also held for vacancies on local councils and the single member constituencies in the Scottish Parliament and Welsh Assembly but not for those elections using a party list system such as what happened in the European Parliament or the top-up members in Scotland and Wales. In these cases the party that holds the seat fills the place from their list.