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 concerns about the vulnerability of Charleston due to its coastal location and the potential for various threats, prompting the move to a more inland and strategically secure location like Columbia.