It's happened again: The leader of a mainstream party was given favorable election odds, ran a poor campaign, got trounced on social media and was taught a painful lesson by voters. It's tempting to ask if they'll ever learn.

Theresa May, the U.K. prime minister, is known as a careful plodder, more technocrat and master-of-the-brief than glad-hander. But she took the biggest gamble possible in politics: She called an election she didn't have to call in a bid to increase her governing majority. Her predecessor, David Cameron, did something similar in deciding to put Britain's membership in the European Union up for a vote last year. Both thought victory was assured and both were punished for their hubris.

It isn't clear yet if May will lose her job as Cameron did. But the election has big implications regardless — for politics, domestic policy and especially the Brexit negotiations that begin in 11 days.