Wikipedia explains things as follows:
The Constitutional Convention
<https://en.wikipedia.org/wiki/Constitutional_Convention_%28United_States%29>
in 1787 used the Virginia Plan
<https://en.wikipedia.org/wiki/Virginia_Plan> as the basis for
discussions, as the Virginia delegation had proposed it first. The
Virginia Plan called for the Congress to elect the president.^[14]
<https://en.wikipedia.org/wiki/Electoral_College_%28United_States%29#cite_note-14>
Delegates from a majority of states agreed to this mode of
election.^[15]
<https://en.wikipedia.org/wiki/Electoral_College_%28United_States%29#cite_note-15>
However, a committee formed to work out various details including the
mode of election of the president, recommended instead the election be
by a group of people apportioned among the states in the same numbers as
their representatives in Congress (the formula for which had been
resolved in lengthy debates resulting in the Connecticut Compromise
<https://en.wikipedia.org/wiki/Connecticut_Compromise> and Three-Fifths
Compromise <https://en.wikipedia.org/wiki/Three-Fifths_Compromise>), but
chosen by each state "in such manner as its Legislature may direct."
Committee member Gouverneur Morris
<https://en.wikipedia.org/wiki/Gouverneur_Morris> explained the reasons
for the change; among others, there were fears of "intrigue" if the
president were chosen by a small group of men who met together
regularly, as well as concerns for the independence of the president if
he was elected by the Congress.^[16]
<https://en.wikipedia.org/wiki/Electoral_College_%28United_States%29#cite_note-16>
Some delegates, including James Wilson and James Madison, preferred
popular election of the executive. Madison acknowledged that while a
popular vote would be ideal, it would be difficult to get consensus on
the proposal given the prevalence of slavery
<https://en.wikipedia.org/wiki/Slavery> in the South:
There was one difficulty however of a serious nature attending an
immediate choice by the people. The right of suffrage was much more
diffusive in the Northern than the Southern States; and the latter
could have no influence in the election on the score of Negroes. The
substitution of electors obviated this difficulty and seemed on the
whole to be liable to the fewest objections.^[17]
<https://en.wikipedia.org/wiki/Electoral_College_%28United_States%29#cite_note-17>
The Convention approved the Committee's Electoral College proposal, with
minor modifications, on September 6, 1787.^[18]
<https://en.wikipedia.org/wiki/Electoral_College_%28United_States%29#cite_note-18>
Delegates from the small states generally favored the Electoral College
out of concern large states would otherwise control presidential
elections.^[19]
<https://en.wikipedia.org/wiki/Electoral_College_%28United_States%29#cite_note-19>
In /The Federalist Papers
<https://en.wikipedia.org/wiki/The_Federalist_Papers>/, James Madison
<https://en.wikipedia.org/wiki/James_Madison> explained his views on the
selection of the president and the Constitution
<https://en.wikipedia.org/wiki/United_States_Constitution>. In
Federalist No. 39 <https://en.wikipedia.org/wiki/Federalist_No._39>,
Madison argued the Constitution was designed to be a mixture of
state-based
<https://en.wikipedia.org/wiki/Federalism_in_the_United_States> and
population-based
<https://en.wikipedia.org/wiki/Proportional_representation> government.
Congress <https://en.wikipedia.org/wiki/United_States_Congress> would
have two houses: the state-based Senate
<https://en.wikipedia.org/wiki/United_States_Senate> and the
population-based House of Representatives
<https://en.wikipedia.org/wiki/United_States_House_of_Representatives>.
Meanwhile, the president would be elected by a mixture of the two
modes.^[20]
<https://en.wikipedia.org/wiki/Electoral_College_%28United_States%29#cite_note-20>
Alexander Hamilton in Federalist No. 68
<https://en.wikipedia.org/wiki/Federalist_No._68> laid out the key
advantages to the Electoral College. The electors come directly from the
people and them alone for that purpose only, and for that time only.
This avoided a party-run legislature, or a permanent body that could be
influenced by foreign interests before each election.^[21]
<https://en.wikipedia.org/wiki/Electoral_College_%28United_States%29#cite_note-The_Federalist_Papers:_No._68-21>
Alexander Hamilton <https://en.wikipedia.org/wiki/Alexander_Hamilton>
explained the election was to take place among all the states, so no
corruption in any state could taint "the great body of the people" in
their selection. The choice was to be made by a majority of the
Electoral College, as majority rule is critical to the principles of
republican government. Hamilton argued, electors meeting in the state
capitals were able to have information unavailable to the general
public. No one who is an elector can be a U.S. officeholder, so none of
the electors would be immediately beholden to a given presidential
candidate.^[21]
<https://en.wikipedia.org/wiki/Electoral_College_%28United_States%29#cite_note-The_Federalist_Papers:_No._68-21>
Another consideration was the decision would be made without "tumult and
disorder", as it would be a broad-based one made simultaneously in
various locales where the decision-makers could deliberate reasonably,
not in one place, where decision-makers could be threatened or
intimidated. If the Electoral College did not achieve a decisive
majority, then the House of Representatives were to choose the
president, and the Senate the vice president, selecting among the top
five candidates, ensuring selection of a presiding officer administering
the laws would have both ability and good character.^[21]
<https://en.wikipedia.org/wiki/Electoral_College_%28United_States%29#cite_note-The_Federalist_Papers:_No._68-21>
Additionally, in the Federalist No. 10
<https://en.wikipedia.org/wiki/Federalist_No._10>, James Madison argued
against "an interested and overbearing majority" and the "mischiefs of
faction" in an electoral system. He defined a faction as "a number of
citizens whether amounting to a majority or minority of the whole, who
are united and actuated by some common impulse of passion, or of
interest, adverse to the rights of other citizens, or to the permanent
and aggregate interests of the community." What was then called
republican government (i.e., federalism
<https://en.wikipedia.org/wiki/Federalism>, as opposed to direct
democracy <https://en.wikipedia.org/wiki/Direct_democracy>), with its
varied distribution of voter rights and powers, would countervail
against factions. Madison further postulated in the Federalist No. 10
that the greater the population and expanse of the Republic, the more
difficulty factions would face in organizing due to such issues as
sectionalism <https://en.wikipedia.org/wiki/Sectionalism>.^[22]
<https://en.wikipedia.org/wiki/Electoral_College_%28United_States%29#cite_note-22>
Although the United States Constitution refers to "Electors" and
"electors," neither the phrase "Electoral College" nor any other name is
used to describe the electors collectively. It was not until the early
19th century the name "Electoral College" came into general usage as the
collective designation for the electors selected to cast votes for
president and vice president. The phrase was first written into federal
law in 1845 and today the term appears in 3 U.S.C.
<https://en.wikipedia.org/wiki/Title_3_of_the_United_States_Code> § 4
<https://www.law.cornell.edu/uscode/text/3/4>, in the section heading
and in the text as "college of electors."^[23]
<https://en.wikipedia.org/wiki/Electoral_College_%28United_States%29#cite_note-23>
Perhaps Germans don't like our electoral college and think they have a
better hold of how best to vote (although our system has been a bit
better at precluding dictators). In any case we have a system that has
worked for us for a long time. Would it be appropriate for the leader
of one of the competing parties to declare, "I reject the Electoral
College system and will declare myself president if I win the popular
vote"? Well, Tilden seems to have done that in a sense (see below), but
Hillary never said anything like that. She and her team strove to get
at least 270 electoral college votes because she knew as everyone who
has striven to be the American president has known that the popular vote
by itself isn't going to get one elected president. Usually the one who
wins the electoral college vote also wins the popular vote but not always.
There was a time when many of the original States behaved, some of the
time, as though they were independent nations. But the solution we
decided upon provided a system that would allow these independent
states to "unite." Although no provision was made to prevent any
state from succeding until after the Northern States defeated the
Southern in a Civil War.
This is the fifth time in American History that the winner of the
electoral college vote did not win the popular vote. Read about the
other times here:
https://en.wikipedia.org/wiki/List_of_United_States_presidential_elections_where_winner_lost_popular_vote
The election of 1876 contended by Hayes and Tilden was the most
acrimonious -- even worse than the Bush/Gore controversy.
http://www.smithsonianmag.com/history/the-ugliest-most-contentious-presidential-election-ever-28429530/?no-ist
It is possible for the electors to declare Hillary the winner and
over-rule the "popular" votes in the states that selected Trump as the
winner. A decision was made in 1876 to the effect that if the electoral
college would declare Hayes the winner, the North would end
reconstruction and pull its troops out of the South. Tilden had plenty
of support in objecting to this agreement: "
While Hayes and the Republicans presumptively claimed rights to victory,
Tilden proved to be a timid fighter and discouraged his party from
challenging the commission’s decision. Instead, he spent more than a
month preparing a report on the history of electoral counts—which, in
the end, had no effect on the outcome.
“I can retire to public life with the consciousness that I shall receive
from posterity the credit of having been elected to the highest position
in the gift of the people,” Tilden said after his defeat, “without any
of the cares and responsibilities of the office.”
His health did indeed fail him shortly after the election. He died in
1886 a wealthy man, leaving $3 million to the New York Public Library."
Lawrence