Bear in mind that in the original Constitution, Article II, § 1, Clause 3, the candidate with the greatest # of electoral votes became president, 2nd place became VP, w/o regard to party..
The 12th Amendment changed that in 1803, largely because of the growth of political parties.
Parties may have partially been the reason but from the very beginning, it appears they realized that was a mistake because it would create a situation in having the President elected almost always elected by the House due to lack of a majority vote in the Electoral College.
The 12th Ammendment was written to avoid a repeat of the 1800 election. As was earlier stated, 1st place was elected President, 2nd place was elected Vice President. In 1800, Jefferson and Aaron Burr ran as a ticket with Jefferson given top billing. The electors were given two votes, thus Jefferson’s electors voted for Jefferson with one, and then Burr with the other. Jefferson and Burr were tied in 1st in the electoral vote. Burr being Burr refused to back down, and contested the election in the House of Representatives. Burr saw an opportunity to be top dog and he took it. Jefferson eventually won the House vote when Hamilton convinced enough Federalists to vote for Jefferson. Hamilton disagree with Jefferson on policy, but despised Burr as a person. This dispute was later resolved in Weehawkin, NJ.