prevents tyranny of majority
The interests of states, especially small states, would be lost in a majoritarian national campaign. The electoral college forces candidates to be attentive to state interests.
When the founding fathers created the electoral college it was with the many purposes in mind, but the tyranny of the masses is the most appropriate in mind here. It is important to remember the timeframe that the US was created in, there was not a very high literacy rate, and it would become very easy without a check on majority rule for someone to manipulate the population when entering power