The Electoral College was created as a fail-safe emergency break that was meant to protect the country from a demagogue. Elector Brett Chiafalo says, "You may think that the Electoral College is supposed to rubber-stamp the winner of the election. That is not the case. In fact that is the opposite of what the Founders intended. They intended for us to subject the winner of the election to exhaustive scrutiny, and if the candidate does not meet our standards we are expected to elect an alternative."
Explained perfectly in 2 minutes:
Additional information at Hamilton Electors.