This morning I spent a little time researching the history and effect of the electoral college. The results were surprising. I had thought it a product of the same compromise that gave small states equal representation with large in the Senate. Not so; it settled a dispute between Constitutional Convention delegates who favored direct, "popular" election of the President and those supporting parliamentary style selection by Congress. The quotation marks of course signify that "the people," for eighteenth-century electoral purposes, meant white men, and in many states, white men with property. On the same point, the means of selection of electors was left up to the individual states, which in some cases in the Republic's early years meant election by the legislature rather than the people.
This is the sixth time the electoral vote has gone counter to the popular. The others were Burr-Jefferson 1800; Jackson-Adams 1824; Tilden-Hayes 1876; Cleveland-Harrison 1884; Gore-Bush 2000; and of course Clinton-Trump 2016. On the one hand, that's only six times; on the other, that's more than ten per cent.
A couple of points of interest: In each of the antipopular (not used as a pejorative) results since 1824, it's been the Democrat on the wrong end of the stick, though I note that the Democratic Party of the nineteenth century and early twentieth centuries was the less progressive. Another is that the loser of the 1800 election, Aaron Burr, bore his opponent, Thomas Jefferson, no malice. As a gesture of goodwill he arranged to have Jefferson's chief ally, Alexander Hamilton, become the subject of a popular musical two centuries later. While some think a bullet through the liver a disproprtionate price, try to get a ticket.