Major Anderson commanded all the army forces and facilities in Charleston. That included Sumter.
The people of Charleston woke up one day to discover that a Union Army detachment had taken up residence in the Fort overlooking their harbor and city.
They had already been in a fort that overlooked their harbor and city.
Now you may not be aware of this, but I have read a newspaper editorial in which the Northern Editor urged them to take over Ft. Sumter and turn it's guns upon the City. (to prevent them from engaging in European trade.) No doubt, people in Charleston had been appraised of this suggestion as well.
And I've read accounts of Southern newspapers advocating seizing Sumter, Moultrie, and Castle Pinkney. And Anderson was aware of that as well.
They had been led to believe that Union military people would eventually be engaging in an orderly withdraw, and yet Fort Moultrie was left in ashes, and now they had taken over Fort Sumter, which was far more threatening if their intentions were hostile. (Which they appeared to be.)
What hostile act did they take?
They burned the guns at Ft. Moultrie.