If bad leaders got executed, then the incentive for bad leaders would be to stay in power no matter the cost.
The reason dictatorships turn murderous when they lose popularity is that the dictator knows they will be killed if the opposition wins, so they have no choice but to go all out and do unto the opposition before they do it to him.