With reference to legitimacy as a political concept, I have already clarified it, but here is another (pre 1776) expression of it.
The Enlightenment-era British social philosopher John Locke (1632–1704) said that political legitimacy derives from popular explicit and implicit consent of the governed: "The argument of the [Second] Treatise is that the government is not legitimate unless it is carried on with the consent of the governed."
And it is this "consent of the governed" that is the direct basis of legitimacy, not some derogation from that principle that a majority of voters might consent
to.