Invading armies would isolate the area inside. Restrict any materials from entering or exiting the perimeter until essentially everyone inside the castle would have eaten all the cattle, horses, food. Exhausted all their resources, and are starved out of rebellion, and submit/ surrender to the invading army.