Why Democracies Elect Bad Leaders