Before the 12th Amendment, ratified in 1804, the candidate with the most votes received the Presidency and the second most received the Vice-Presidency. All electors had one vote, only for the Presidency. From the viewpoint of men like George Washington, who pled with America to avoid factions, this seemed logical, as anyone voted in should work together to help America. However, as we all know, political parties emerged, and people began to argue.
In 1796, America voted in John Adams, a Federalist, as President, and Thomas Jefferson, a Democrat-Republican, as Vice-President. These two were rivals, and so obviously America was not led by a united front. Tensions rose to a point where the next election would prove crucial, and so Federalists came up with a plan. Adams had a running partner, Charles Pinckney, but delegates decided to spread their votes to avoid a tie, which would go to Congress to be decided, and so one delegate voted for John Jay. However, Democrat-Republicans all voted their ticket, resulting in the aforementioned tie, going to the House of Representatives, with each state having 1 vote. This was ironic in the fact that a state like Delaware had the same voting power as Virginia, going against what the electoral college was intended for in the first place.
The vote itself is where the pre-Amendment system really destroyed itself; with a majority needed, Congress failed, again and again, to vote for a President. It took until the 36th vote for Jefferson to receive some defectors to gain the majority. Obviously, having the President and Vice-President disagree was not beneficial, and having parties use their one vote to manipulate the system went against democracy. And so the two-vote, one for President and one for Vice-President was proposed and ratified.
https://www.britannica.com/event/United-States-presidential-election-of-1800
https://constitutioncenter.org/interactive-constitution/amendments/amendment-xii