In 1787, 11 years after the United States declared its independence, the Founding Fathers came together to write the Constitution.
Prior to this, the U.S. was guided by the Articles of Confederation that prohibited a central government and allowed each individual state, in part, to operate as separate entities with its own set of rules, regulations and laws. This caused a lot of chaos and fighting, especially in areas of trade and commerce. It also left the new country defenseless without a military to defend it.