Very few UK Prime Ministers or their Parties have been elected by a majority of those who bothered to vote, varian. The US democratic system of electoral colleges is different from ours but it is a form of democracy and the rule is that if a presidential candidate wins the electoral college votes, s/he becomes president, regardless of the popular vote.
Both systems are imperfect, like everything else human, but they have served both countries reasonably well for a long time.
There's always rooms for improvement but it's not always easy (usually isn't, in fact).