Sieges are terrible, not just for the defenders, but often for the attackers as well. The longer they go on, the worse they get. And the awfulness of a siege contributes to its power: suffering for weeks or months or years on end, or even just the prospect of that suffering, factors into the calculations about whether to surrender (on the side of the defenders) or abandon a siege (on the side of the attackers).
Much of the hardship revolves around food. Since armies cannot — outside of fantasy or SF — poof into existence right outside your walls, you generally have enough warning to gather in supplies from the surrounding countryside, and cities may also keep their own stockpiles as a matter of course. But is that enough to keep everybody fed? On a long enough timeline, the answer will always be “no,” unless you’re able to keep supply lines open (remember, this is how you get years-long sieges). Sooner or later, people will begin to starve.
You can lengthen that timeline with rationing, though that may well mean assigning some of your forces to defend your food stores from your own population. You can also lengthen it by getting less picky about what you eat: probably no human settlement is more rat-free than a city deep into a siege. During the Siege of Leningrad in World War II, residents peeled wallpaper off their houses, because the paste used to stick it in place was made from potatoes. And yes, if things get bad enough, you absolutely can wind up with cannibalism, the living eating the dead to buy themselves a few more days.
Water is usually less immediately critical, because if the besieged location doesn’t have its own supply (from e.g. wells or a river), then it can’t hold out for any length of time to begin with. For a site supplied via aqueduct, that immediately becomes a high-priority target for the attacking army — though admittedly they’ll be wrecking their own ability to use the place, too, until it gets repaired. But water can also turn into an issue through contamination. Disease is one of the great horrors of a siege: malnourished people are more vulnerable to infection, and a besieged settlement usually has limited ability to dispose of its dead. Depending on the hydrography of the area, the attackers might be able to deliberately foul the water supply, for example with decomposing animal corpses, thereby sickening the populace.
And, as I said before, don’t discount the purely psychological side! Bombarding the walls with cannons and catapults, raining down a constant stream of arrows or sling bullets, blanketing the site with written propaganda, torturing captives within sight of the walls, and more are all tactics used to sap the will of the defenders to resist. Even if the leadership holds firm, a rioting populace at the very least weakens their ability to hold the walls (because now some soldiers must fight a battle inside, too); at its extreme, it flips control of the city or castle to someone who’s willing to surrender.
That, however, is not necessarily the end of the horrors.
Sometimes targets that surrender are treated well. Like I said before, though, places that resist are often punished for it afterward, with executions and looting at a minimum, and often far worse. And for part of the reason why, let’s look at the attacker’s experience.
On this side of the walls, your problems aren’t quite as bad as those of the defenders . . . but they can still get bad. How is your besieging army feeding itself? Much of the food in the immediate neighborhood is probably behind those walls, and whatever’s still left out in the fields or granaries will rapidly be devoured by your soldiers. If you don’t control the rest of the region or have a reliable supply line bringing you food from your own heartland — which is hard-to-impossible to arrange without motor transport or magic — then you’re having to send foraging parties out farther and farther. Like the defenders, you may have to impose rationing, and starvation awaits you down the road.
And you likewise have to worry about disease. Especially if discipline around waste disposal grows lax (which it’s in real danger of doing as soldiers grow restive and discouraged), camping thousands or tens of thousands of people in one spot for months on end is a great way to spread contagion. When Carthage besieged the city of Acragas, their army’s worst enemy wasn’t the Greeks inside; it was the plague that decimated their ranks and killed their general. Even if your soldiers don’t die, they may desert, which from the perspective of siege effectiveness is essentially the same.
This creates a really awful dynamic when the siege finally breaks, whether through surrender or successful assault. Even if the attacking side doesn’t have a military policy of brutalizing the populace in punishment for resistance, it is incredibly difficult to restrain a body of soldiers who are hungry, bored, and out to avenge their suffering on the people who caused it. Generals frequently didn’t bother trying. It’s not uncommon to see in the sources comments about how commanders routinely let their forces rampage for three days or so before starting the process of corralling them once more.
Three days — or sometimes more — of absolute atrocity. Not just looting but rape and murder of the most horrific sort, soldiers torturing their victims for sport. Nowadays we have conventions that say civilians are not acceptable military targets; however often those conventions may be broken, it’s still a step up from not that far in the past, when civilians were one hundred percent fair game. Generals could and did order the massacre of entire cities, or march whoever survived off into a life of enslavement.
Knowing that fate might await a defeated city or castle, you start to see why people would endure months of privation and disease in the fading hope that reinforcements would come to rescue them — or commit suicide rather than be taken, as legendarily happened at Masada — and why some places would surrender the moment the attacking army showed up. The latter was not without its consequences, especially if your own side later prevailed and turned its attention toward traitors . . . but given the alternatives, taking the easy path now could be very attractive.