LONDON — Among the many satisfying outcomes of Britain’s general election has been the roll call of pundits reeling out apologies for getting it so wrong. The Labour Party has, against all odds, surged to take a 40 percent share of the vote, more than it has won in years. And so the nation’s commentariat, who had confidently thought that the party under Jeremy Corbyn’s leadership would be wiped off the political map, are now eating giant slices of humble pie.

Nobody is in politics to gloat. Labour’s leadership team and supporters alike want the party to win not for the sake of winning, but in order to bring Labour’s economic and social agenda to Britain, to measurably improve people’s lives. Still, a little schadenfreude is definitely in order.

Mr. Corbyn, from the left of the party, unexpectedly took its helm in 2015 after a rule change allowed, for the first time, rank-and-file members to have an equal vote for their leader. And he has been ridiculed, dismissed and bemoaned ever since. Cast as an incongruous combination of incompetent beardy old man and peacenik terrorist sympathizer, Mr. Corbyn faced down a leadership challenge from his own party about a year ago and constant sniping, criticism and calls for him to quit throughout.

The political and pundit classes, in their wisdom, thought it entirely inconceivable that someone like him — so unpolished, so left wing — could ever persuade voters. After Britain’s referendum decision, last June, to leave the European Union, more scathing criticism was piled upon the Labour leader for his decision to, well, accept the democratic referendum decision, however bad it was.