Non-democratic countries hold elections to choose representatives, though the same may not hold true for the supreme leaders of such governments.
There are several people in a government and they all have to be chosen. Elections are held in non-democratic countries are held to fill in such posts.