Some delegates wanted Congress to choose the President, but that would have upset the balance of power among the three branches of government. Others called for direct popular vote, but that would have left the decision in the hands of ill-informed voters who knew little about politicians outside their home state.
So they created electors. And they hoped the electors would be some of brightest and best informed people who would base their decisions on the candidates' merit. (Each state gets as many electoral votes as it has members in the Senate and House.)
Hope this helped!