During the American Civil War, the north and the southern armies had different goals, the Union at the beginning wanted to reunite the country, but later the goal changed to include the abolition of slavery. The Confederacy had a different goal, wanted to incorporate all slave states and secede from the Union.
To win the war the Union had to capture the Confederate territory and the Confederate just wanted to defend its territory.
After the capture of Port Royal, the Union noticed that it would be effective to make an economic pressure into the Confederates and establish a US military depot on the southeastern coast to carry out land and sea operations.
After the win of the Port Royal battle by the Union, the Confederates noticed that the coastline was too big to defend so the Confederates concentrated the defenses further inland, nearer the coastal railroads in the hope that reinforcements could be rushed to any danger point in time to prevent its capture.