The electoral college is based on the US being an agrarian society, something it no longer is. Today 62.7 percent of the US population lives in urban areas. The founding fathers did not foresee this. The electoral college favors rural areas and gives them more vote per person than people in urban areas. They are also as a population less educated than urban people. They also tend to be more conservative. This is the reason why the two elections in recent times where someone has won the presidency not by the popular vote but by the electoral college have gone to Republicans. Of course Republicans favor keeping the electoral college, not because it is the 'right' thing to do, not because the US is a republic rather than a democracy, but because it favors conservatives over liberals. It's like affirmative action, which they hate. It is affirmative action for conservatives.
The electoral college doesn't take into account what you do for a living or your education or whether you're a liberal or conservative. It simply gives equal voice to those living in smaller states.
Two elements of the “Great Compromise” among the large and small states led to the ratification of the Constitution. A House of Representatives would reflect the popular vote—disadvantaging the small states—but a Senate would give the small states equal representation with the large ones.
This idea was carried through to the Electoral College, where each state’s allocation of electoral votes is simply the total of its representation in the House and Senate. This again gave the smaller states some additional power in the important choice of the president.
Leaving aside the fact that a deal is a deal, there are very practical reasons why we will always need the Electoral College under our current constitutional system.
Bill Clinton won both presidential elections with less of the popular vote than Donald Trump received.