Why do you have capitals of states?

Because a state was originally it own country (in Europe a state is a country) that created there own laws governed by an overall union that was supposed to preserve Life, Liberty, and the pursuit of happiness. As time has passed since our founding fathers the Federal Government has obtained more powers and you do not see state governments with as much.
Federal Government slowly took the power away from state governments with the threat of tax help. A great example of this is Louisiana who was persuaded by the federal government to raise its drinking age to 21 by not allowing them to have tax money for its highway systems unless they conformed.