Originally the President was the person who got the most electoral votes, and the VP was the runner-up. In the 1796 and 1800 elections that produced opposite-party Pres. and VP and they realized what a bad idea that was. The 12th amendment changed the voting to have the electors cast separate votes for each, and since the elector for a party was very likely to vote for the VP from the same party we now have these combo tickets.