The election happened because of a vote of no confidence in the James Callaghan passing by one vote in the House of Commons on the 28 March. This vote happened because Thatcher had brought it forward. It forced the election to happen.