The final irony in an election filled with irony is the refusal of some voters to accept President-elect Donald Trump's victory. This group doesn't simply include protesters but a movement of some size to persuade the electoral college to vote for Hillary Clinton instead of Trump. The irony is that it was Trump who threatened to refuse to accept the results of the election, while the Clinton camp charged that Trump was violating the sanctity of democracy. Now each has adopted the other's position. Although, Clinton herself has not sought to overturn the election.
Irony aside, it should be borne in mind that asking electors to vote differently than they had pledged to is completely legitimate. The president of the United States is not elected either by popular vote or even by the mathematics of electoral votes. Presidents are elected by electors - these are the people voters actually cast their ballots for on election day. All electors are selected by the parties to whom it is assumed they will be loyal. But legally, their vote is theirs and they are empowered by the constitution to use their judgment as they see fit.
The U.S. Founded as a Republic
The founders chose this method, and I think it is a pretty good one for a number of reasons. First, the U.S. was not founded as a democracy. Leaving out all those who originally were unable to vote (slaves, women, men without property in many states), the founders created a republic. A republic is a system in which voters do not govern directly, but select representatives to speak for them.
The representatives are not bound to slavishly uphold public opinion, but to exercise their judgment. They face periodic elections, every six years in the Senate and every two years in the House of Representatives.
The founders feared that passions could arouse the public, and national policy could become hostage to these passions. Therefore, they wanted men (always men) mediating between public opinion and national policy. They also expected these men to be of substance and property, with much to lose from error and also more difficult to corrupt. This mirrors Trump's argument that he is less corruptible because of his wealth.
Therefore, the founders did not believe in direct democracy at all. They founded a republic, a very different creature. The electoral college is derived from this original conception of republicanism. The founders were trying to solve a serious problem with this system. They did not want a parliamentary system. Parliaments made the executive and the legislature one. They wanted the executive and Congress to check and balance each other (and do they ever). Therefore, they needed another institution.
The founders didn't want political parties as they feared factionalism. They never anticipated the two-party system, which presents voters with basically a binary choice and minor parties on the margins. What could have occurred, and what might yet occur, is complete gridlock -- a situation with many viable candidates, none with the majority of the popular vote or the majority of electoral votes. Who could solve this problem? An entity was needed that could negotiate, compromise and create a coalition to elect a president by majority. These people had to be free to change their votes in the course of negotiations.
Protecting States' Interests
The founders did not opt for direct election of presidents because they opposed direct democracy and supported representative government. But there was another reason as well. The U.S. was a coalition of sovereign states. That's why it is called the United States. Each state is required to have a republican government, but the U.S. is not a direct compact with the people. "We the people" are the foundation of the Republic, but the states are the legal foundation.
The states wanted to be assured that one state would not override the interests of the others and no state would be completely excluded. Thus, each state was given two senators, regardless of size, so that in one house of Congress all states were equally powerful. In the other house, representatives would be apportioned by the size of the population. The House of Representatives, elected every two years, would represent public opinion. The Senate would represent the interests of the states, limit the passions of the people by blocking the House, and make it hard for the president to propose measures, make treaties and ratify appointments.
The electoral college gives each state electors equal to their two senators and the number of representatives apportioned to them. No state has less than three electors, and therefore any state potentially can decide an election, and all regions, no matter how lightly settled, must be considered. Since any state might make the difference, every candidate must consider each state's interests.
The system the founders produced compels all candidates to pay serious attention to underpopulated states. In this election, highly populated states like California, Texas and New York overwhelmingly supported Clinton or Trump from the beginning. Smaller states like Nevada or New Hampshire became important. Without the electoral college, the idiosyncratic interests of small states would receive little notice. A broad national marketing campaign, insensitive to significant regional differences, would decide the result.
The U.S. is a geopolitical invention. The 13 original colonies were very different from each other. As the nation expanded westward, even more exotic states became part of the union. Constantly alienating smaller states through indifference could undermine the national interest. The Senate and the electoral college both stop that from happening, or at least limit it. Any state can matter in any election.
You might charge that this is undemocratic. It is. It was intended to be. The founders did not create a direct democracy for a good reason. It would have prevented the U.S. from emerging as a stable union. They created a republican form of government based on representation and a federal system based on sovereign states. Because of that, a candidate who ignores or insults the "flyover" states is likely to be writing memoirs instead of governing.