Hamilton explains it...
...It was desirable that the sense of the people should operate in the choice of [
the President]. This end will be answered by committing the right of making [
the choice] not to any pre-established body, but no men chosen by the people for the special purpose, and at the particular conjuncture.
It was equally desirable that the immediate election should be made by men most capable of analyzing the qualities adapted to the station and acting under circumstances favorable to deliberation, and to a judicious combination of all the reasons and inducements which were proper to govern their choice. A small number of persons, selected by their fellow citizens from the general mass, will be most likely to possess the information and discernment requisite to so complicated an investigation."
Alexander Hamilton, The Federalist, No. 68
http://lwv.org/content/who-will-elect-president-electoral-college-system