The Electoral College was created by the founding fathers to prevent the potential for a tyranny of the majority, In order to prevent the people in the large states from dominating the people in the small states Electoral College was established.
Each state was given the authority to determine who the electors would be and how they would be chosen. The job of the electors was to vote for the candidate in their judgment would make the best President,
The election of the President did not become a statewide popularity contest until the election of Andrew Jackson in 1828, Initially the electors were chosen to represent their Congressional Districts, as the power and influence of the political parties increased, the electors began to be chosen by the political parties on a statewide basis,
This made it possible for the large metropolitan areas to completely dominate the smaller rural counties.