It wasn't. It was a compromise to get southern slave republics to join as states.
The worst part is where, if there is not clear EC majority, the election gets throw to the House where each state's delegation gets a single vote, and the guy who gets the most state's votes wins. It's wildly antidemocratic, and beyond asinine.