The Constitution was written by representatives of the states and it was ratified by the people of the states in ratifying conventions.
The government for the united States was created to form a union o13 states not a single nation. Each of the states was a separate and independent republic with the right to govern themselves. The goal of the states was to create a more perfect union where the lives, liberty and property of the people could be secure.
Each of the states agreed that each state would have the opportunity to participate in the election of the President, Instead of having just one election, there would be an election in each of the 13 states and the candidate with the most votes in each state would receive that state's electoral votes.
Each state would have 1 electoral vote for each Congressional Representatives. If the President was elected based on the popular vote of the people in all of the states, the people would be represented, but the states would not.