In the olden thymes, a mad king presented the elite with a dilemma. Violating the system for naming a king by, say, voting to remove the king, would introduce dangerous ideas into the system. At the same time, willy-nilly removing the king undermines the whole point of having a king and a line of succession. It was always the critical flaw in hereditary monarchy. What do you do when the king is a liability?
For the benignly mad king, the answer was to work around him until he went to meet his maker. His counselors, maybe his wife or even his mother would make the decisions while the mad king was maintained for ceremonial reasons. Once a suitable replacement was available, like a son or a brother, then the mad king would choke on his dinner or fall of a horse. Everyone could pretend it was a natural transition and there was no need to question anything.
At the other end, the malignant king, the tyrant who was sane enough to to perform his duties, but mad enough to cause great harm, was a serious problem. Often, the tyrant is smart enough and paranoid enough to eliminate obvious replacements, thus buying himself some life insurance. Eventually, the risk of keeping the tyrant in power is greater than the leap into the unknown and the mad king falls of his horse or eats a bad apple and he is dead.
The take away here is two-fold. One is the madness of the ruler or the ruling class is only important if it puts the ruling class interests at risk and it has to be a critical mass of them at risk. Killing one noble is tolerable. Threaten 25% of them and you have a revolt brewing. Caligula did not get himself in trouble merely because he started killing the beautiful people in Rome. His mismanagement threatened the general welfare and risked a general revolt. The financial crisis of 38 AD resulted in a famine, which was a direct threat to the system.

Pandora John William Waterhouse
The other takeaway is that when left with a choice between near certain death or ruin and some unknown outcome, people will choose the latter, even people with a lot to lose. It’s the only rational choice. If the status quo means a 99% chance of destruction and killing the king opens a range of possible outcomes, some good and some terrible, the numbers favor killing the king. In fact, they make regicide a moral duty.
Killing the king, however, is really not a solution. The leap into the unknown is opening Pandora’s box. It has often led to the demise of the ruling class. The assassination of Caesar was arguably the great mistake of Roman history. Waiting the guy out probably would have turned out better for the Roman elite, but they could not see what was over the horizon.
In theory, representative democracy was supposed to solve this problem. If David Cameron starts doing things that make him a liability, his own party will abandon him, because they know they will face the voters eventually. If one party goes bonkers, like the Labour Party led by Jeremy Corbyn, then the party collapses. The ruling class competes with one another and the audience votes on who wins each little skirmish.
For the most part, this has worked out well for the English speaking world. In these countries, the ruling elite has supported the system where the general population gets a say in the management of the country. Europe is another matter. The ruling classes of the Continent have never bought into the concept. The European Union, after all, is mostly a way around the local legislatures and the will of the people.
Europe operating as a market-state without external threats and a pacified population gave the ruling class of Europe the sense that this arrangement would work long term. Then the king went crazy and flung open the doors to Muslim invaders. Initially, this was not a problem as the ruling class lives in bunkered enclaves, removed from the consequences of their polices. They have no reason to care if the train stations are carnivals and rape and assault by the dusky sons of Mohamed.
**Note: There was a pic I grabbed on-line but the person who took the pic and some other members of the OCD community took issue with my use of it. These are folks who can’t see the forest through the trees and want to spend all day haggling over meaningless details. I have no time for this so I removed the pic. My apologies to the OCD community. I will forever avoid noticing them so this sort of mistake does not happen again**
But, the people have noticed that their liberties are slowly and methodically being curtailed in the name of public safety. When you can only enjoy a traditional parade from behind barricades and armed soldiers, you’re going to start having dark thoughts about the people who caused it
When you have to start putting your wife and daughter on a segregated train car, for fear the Muslims may rape them or simply go crazy seeing an uncovered female head, the mad king is no longer a man for whom you will pledge allegiance. When the king cancels the “March Against Fear” out of fear of offending the invaders, it’s hard to love the king. Instead, you start thinking it is time to kill the king. It’s either him, or you, no matter what comes next.
Also need to kill all the king’s men.