The best explanation for why the capital of South Carolina was moved from Charleston to Columbia is: Charleston was a target for attacks by several different groups.
The relocation of the capital was influenced by strategic considerations, including the desire to secure the capital from potential military attacks, especially during the Revolutionary War and other periods of conflict. Columbia's more central location was seen as a safer and more accessible point for governing the state.