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.
This reflects the strategic decision to relocate the capital to a more secure, inland location to avoid the threats posed by coastal attacks.