When you look into why the Electoral College was created, two reasons generally come up.
One of them is to balance things out between states, so that big, heavily populated states don’t get to control everything, just because they have the most people.
Another reason is to provide a safeguard, so that some maniac isn’t voted in by a gullible majority. The electors are supposed to be reasonable and responsible people, who can be trusted to fix things in case of an extreme electoral disaster with the popular vote. This one’s a little hard to figure, but it’s apparently what was on the minds of the framers of the US Constitution.