1. Extreme candidates have very little chance of winning;
2. The system is (formally) fair in the long run; and,
3. It secures the election against tampering from both domestic and foreign actors.
Also, frankly, the sort of person who's good at winning an election is almost diametrically opposite from the sort of person you want as a leader. It's hard to combine "ideologue" with "rational compromise ready actor".