Yes, it's a safety valve to guard against dysfunctional democracies. It's a compromise, and yes you will limit the service of both good and bad leaders, but that doesn't make the compromise any less valid. Many people fear change, and don't like to admit they made a mistake, and base a lot of their vote on personality rather than achievement, and as a result of these factors people can keep voting for someone even if they do a poor or mediocre job.
I personally believe the best form of democracy would be something along the lines of a liquid democracy, coupled with a constitution that protected the rights of everyone (to ensure those with minority viewpoints would always be entitled to a base level of respect). If you're interested in finding out about liquid democracy, this video provides a good introduction:
https://m.youtube.com/watch?v=fg0_Vhldz-8