The Electoral College was established by the U.S. Constitution (Article II, Section 1) in 1787, and one of its primary, stated purposes was to safeguard against the "tyranny of the majority," ensuring that a candidate could not win the presidency solely by winning a popularity contest.
The men who created the electoral college did not trust the jidgmrnt of the majority of the uninformed white men with the task of electing the President. They beleived that a panel of well educated men of integrity would produce the best possible results.
The winner-take-all method for allocating electoral votes, used by 48 states and D.C., awards all of a state's electors to the candidate with the most popular votes, reducing the influence of minority party voters within that state and creating "wasted" votes. Critics argue this violates the "one person, one vote" principle by rendering votes for losing candidates meaningless and discouraging voter turnout in non-swing states.
The Winner Take All method used today disenfranchises potentially miullions of voters.
Statewide direct popular elections of the President turn the election into a popularity contest where up to 49% of the votes are not even counted.
The electors were intended to be like a jury of wise men chosen to determine which of the candidates would best serve the people and honor their oath to preserve, protect and defend the Constitution.