The electoral college as it is used today is not used as it was intended.
The original intent (and current law) was for the voters to elect electors.
And the electors would then vote on the president.
They didn't really trust the common people to directly elect the president.
How it is used to day is that voters vote in each state.
And in almost every state, the popular vote in that state determines the winner of that state. All of that state's electoral votes go to the candidate with the most votes, regardless of margin.
(two small states chose to split their electoral votes)
The most popular feature of this method is that we can usually determine the president elect on the same day of the election.
Give CA, TX, NY AL, etc all of it's electoral votes quickly and wait for the totals of the close states which can normally be determined before people wake up the next day.
If we had a national popular vote, it would take weeks to announce the winner.
TV news shows would hate that.