There are at least two ways that this can be answered.
One way is to say that the Articles of Confederation were created as the first constitution of the United States. When the colonies declared independence from Great Britain, they had to have some sort of constitution that would set out the new country's form of government. The Articles of Confederation were created to do this.
Another way to answer this is to say why the Articles of Confederation (instead of some other constitution) were created. The reason for this was that Americans were very much afraid of centralized government. They did not like being ruled by faraway England and they thought that it would be nearly as bad to be ruled by some faraway national government. They thought that such a government would be more likely to oppress them than state governments would be. For this reason, they created the Articles of Confederation, which gave essentially all the power to the states and created a very weak central government.