As a lefty, the disarray in the Tory party provides a lovely schadenfreudic coincidence – that the same intellectual failing that causes the party’s bad government also causes it to elect unsuitable leaders.

This failing is an inability to see failures of collective action – to see that what is rational for each individual is often bad for everybody.

An obvious example of this came in 2012 when Cameron advised people to top up their petrol tanks in advance of a strike by lorry drivers. He failed to see that whilst this might have been sensible for any individual, its aggregate result was to trigger panic buying and fuel shortages.

There are, though, other examples. Collective action problems mean that public goods such as infrastructure are under-supplied and public bads such as pollution are over-supplied: each individual thinks it won’t make any difference to the climate if he gets on a plane, with the result that too many do so. If everybody – especially the government - tries to cut their borrowing the result is not lower debt but lower incomes for us all. Similarly, whilst you might be able to incentivize any one person to find work by cutting benefits, you cannot incentivize everybody this way: the result is just misery for those out of work. And we cannot rely upon shareholders to control company managers because the hard work of doing so is borne by the individual shareholder whilst the benefits are spread widely over all, with the result that we have inadequate corporate governance. And so on.

The point of politics is to solve collective action problems such as these. The Tory party has, however, under-rated the importance of such problems and so have given us austerity, economic stagnation and an inadequate response to the climate emergency,

Here, though, is the nice irony. The same blindness to collective action problems that caused the Tory party to wreck the economy is now causing it to destroy itself.

What I mean is that its choice of leader suffers the same problem. Each individual considering who should be leader thinks of his personal perspective: who personally do I find simpatico? Whose ideology is closest to mine? And, for MPs, who will give me a job?

These considerations of private gain, however, neglect the collective good (from Tories point of view) of the health of the party. What matters for the party is not that it has the leader closest to your own ideology, but that it has the right leader – that a round hole be filled by a round peg.

This is true in business. As Boris Groysberg and colleagues have shown (pdf) If a company needs a marketing man as CEO but hires an engineer, things go wrong. But if it needs a marketer and gets one, it does well.

And it’s true in politics too. For example, Churchill was a man of massive flaws. But in 1940 many of these faults, such as bombast and belligerence, became virtues. And other failings – such as his racism and ignorance of domestic economic and social matters – weren’t important. In 1940-45, Churchill was a round peg in a round hole. Before and after then, he was not.

Or consider Cameron. He was the right man to detoxify the Tory party in 2005. But the same overconfidence that led him to stand for leadership despite a lack of experience also caused him to call the Brexit referendum. What was a strength in 2005 was a catastrophic weakness in 2016. He stayed the same shape, but the hole changed.

Or consider May. One can imagine circumstances in which her stubbornness would be a strength – if the party had a good strategy which needed sticking to. But these are not the circumstances we’ve had recently. We’ve needed a negotiator – someone with intellectual flexibility and interpersonal skills. And May is wholly lacking such skills.

What matters, then, is the match between the requirements of the job of party leader, which vary from time to time, and the qualities of individual. Sometimes, as in Churchill’s case, the match is good: the man’s vices can either become strengths or be easily overlooked. What we have now, though, is a terrible match: May’s weaknesses are horribly exposed.

If Tory members and MPS consider only their private gain – “who most agrees with me?” – they’ll not ask who is the best match. It is only by accident then that they’ll elect the most suitable leader. And it’s a long time since this accident happened: the party’s last five leaders – Hague, Duncan-Smith, Howard, Cameron and May – have all left something to be desired.

But it was not always thus. Before 1965 Tory leaders were not elected but rather chosen by grandees. Because they were often old enough to have sloughed off ambition, such men put a higher weight upon the good of the party and less upon their private gain. They solved the collective action problem, and the Tory party was much stronger for it. The party has, however, now lost this solution. And the delightful irony is that the same blind spot that has caused it to wreck the country is now causing it to wreck itself.