In the Federalist Papers, Alexander Hamilton wrote that the Electoral College would act as a safeguard against unqualified candidates becoming president. He thought it'd be possible for a rich famous asshole to leverage their popularity to become a governor or state legislator, but surely they wouldn't be able to fool enough electors to become President! Whoops. https://ballotpedia.org/Federalist_No._68_by_Alexander_Hamilton_(1788)