I remember last time I came there, it was occupied with Forsworn. I killed them all. Later, when I came back, it's occupied by the Imperial Legion, as if the Imperial Legion questline is completed. I didn't actually take sides. When I entered, the soldiers say that I'm interferring or something. Almost same dialoges as when they walk on the roads with a Stormcloak prisoner. When I met the commander, he said "You're tresspassing here, you need to clear out". I have no idea what happened. Why did the Imperial Legion take Fort Sungard without joining sides and doing Civil War quest missions?
Fort Garrisons have nothing to do with Civil War questline completion. They have to do with clearing out the former inhabitants: once you do so, it will be occupied by the faction that currently controls that hold. That said, if you clear out a Fort in Stormcloak territory, then side with the Legion and take that Fort, it will be realigned to the Legion.
It can also be affected by the main Skyrim quest i think but Fort Sungard is used in the civil war quest line keep that in mind if you do take a side, i activated one of the forts early with one character and it broke the war quest line for them.