“A situation like this is uncommon and limited in scope, partly due to the fact that there is an electoral college system. A narrow margin in a pure national popular vote would bring a nightmare of 50 recounts, not one.”
This is one of the best reasons to keep the electoral college system.
And the next best reason is the reason it got put in the Constitution. To give each state a certain quantity of voice in the result simply based on the fact that it is a state. Without that, it would quickly turn into an appeal to big cities, and flyover territory forgotten.