The intent and purpose of the Electoral College serves the same purpose as the Senate within the Legislative branch, it helps to give smaller less populated states an equal footing. Each state has the same number of electors as it has members of congress and the senate combined thus smaller states get a little boost in their representation to keep larger states from forcing their will on smaller states.
Where things get a bit messed up is that each state determines how it's electoral votes are given, some are winner takes all, some are divvied up based on percentages of the vote.