In the Federalist Papers #68, Hamilton, et. al., argued:
"Talents for low intrigue, and the little arts of popularity, may alone suffice to elevate a man to the first honors in a single State; but it will require other talents, and a different kind of merit, to establish him in the esteem and confidence of the whole Union, or of so considerable a portion of it as would be necessary to make him a successful candidate for the distinguished office of President of the United States"
Put another way, Hamilton was afraid a demagogue could win over the hearts of the people of one state, and use that to trick everybody. By ensuring that the entire nation have a voice, and that the common mob at least had a buffer, the electoral college was considered an improvement over vulgar popular rule.
To date, there have been only four elections wherein the electoral college overruled the popular vote. (And I'm going to do this from memory):
- 1824, in which John Quincy Adams was able to throw the vote to the House. Andrew Jackson won the popular vote, and beat Adams 4 years later.
- 1876, in which Samuel J. Tilden proved he was a man who loved America (or at least the South) more than his own ambition. When ballots were
rigged in dispute in South Carolina, and yes, Florida, Tilden brokered a deal with Hays ending Yankee imperialism Reconstruction in exchange for his concession.
- 1888, in which the once and future Grover Cleveland actually had more votes than Benjamin Harrison, but who nonetheless had fallen afoul of the New York machine that originally got him elected.
- 2000, in which Gore was famously Bush-whacked in Florida, but the real winner was in fact any boy named 'Chad'.
As you can see, twice the 'loser' went on to win again. And, both Tilden and Gore were able to influence policy, and clearly robbed the victor of a mandate. The point of the electoral college is to ensure that all voices in all states get heard, and even when a perverse result or a faithless elector occurs.
Finally, in 1872, the Electoral College prevented what could have been a crisis had more votes gone to Greeley. Greeley went mad after the election but before the electoral college met. Mercifully, he died shortly thereafter, but the cautionary tale remained - the electoral college is a safeguard against the popular vote.
It can go wrong, and the electoral college is supposed to protect against it. It ensures everyone is heard, and it adds a sense of 'thought' to the process. Is it perfect? Heck no! It is downright undemocratic - but that is the point the founders were trying to achieve.