Some of you seem to be mixing two distinctly disparate elections and systems of governance, both democratic, yet different:
a) parliamentary
vs
b) republic.
Under (a), MPs are elected by the electorate, who then choose a Prime Minister from the winning political party. The PM is not on the ballot, and a good example is Britain.
Under (b), the President and his VP are on the ballot and are elected by the people. The US is a case in point even though in the US, the public does not directly elect the President, and is not a direct democracy, but a representative democracy. Instead, the Electoral College chooses the President and is expected to choose the Candidate who wins the Popular vote. This is not always so, as seen in 2000 in Al Gore (won the popular vote) vs Bush (chosen by the Electoral college), and in 2016 in Trump (chosen by the Electoral college) vs Clinton (won the popular vote).
The Somali model is parliamentary inherited from the colonial overlords. No presidential candidate is on ballot, but the political party.