That's true although, given the electorate scale, a “close” nationwide outcome might be a matter of tens of thousands or hundreds of thousands of votes. Al Gore's “margin of victory” in 2000 was 543,895.
¹
Plus, California doesn't have an “official” certified count including absentees and challenged ballots until weeks later. While Democrats have dominated lately, so it's been easy to call precisely who “won” California on election night, the magnitude of that victory based on the actual tally, comes considerably later and could definitely have a sufficient swing to affect the outcome of a
very close national election.
Combine that with 49 other states, and, while you might have a pretty good idea of who won the election on election night or the following day, you might have weeks to wait to know for certain and think of the mayhem as lawyers were flown to principalities in search of more votes or to discredit other votes.
And, if, after weeks of waiting for the final count, we found that it was necessary to have a nationwide recount; can you imagine the costs and the chaos? The risks associated to such an outcome, albeit unlikely, are enormous.
No, I think the Electoral College prevents those events from happening outside of one or two states, and spares the rest of the nation for the most part from suffering those consequences.