You may not have learned that the American Revolution was fought between the British and thirteen separate colonies that each considered themselves to be sovereign. The original organizing document was the Articles of Confederation, which created a very weak federal "government" that was responsible for just a few things, but without the authority to raise funds from the Several States to actually do any of those things.
The US Constitution didn't take effect until March 1789, and it contains the Electoral College and the Senate specifically so that the States (wanting to maintain some semblance of sovereignty) would ratify it.