What makes a state pick its capital?

A state picks its capital by buildings, attractions, e.t.c. The capital chosen by that state has to have something very popular about it, something that attracts many people.