The only thing the electoral college does is give the voting power of local minorities to local majorities.
3 million people in the state vote for A
4 million people in the state vote for B
B gets 7 million people's worth of electoral votes, A gets nothing. Repeat 47 times.
There is no explanation for this that makes sense. It wasn't designed this way, it happened by accident. The framers tried to stop it in the 1790s and 1800s, but there was no political will: everybody wanted to exploit the antidemocratic loophole in the constitution instead of fixing it.