I understand that the king or lord would have been inside the castle (perhaps with much of the treasury/gold), but an enemy army could just walk through the cities and countryside, looting and pillaging, while the defending army is stuck in a small castle.
What was it about a castle that made it such an important strategic objective for the attacker?
This is assuming that the defenders stay inside the castle, which isn't quite how it'd go. There are multiple other factors to consider. More can always be said on the matter; for the meantime, we actually had a thread just three days ago on just this same topic, with contributions from u/BRIStoneman, u/olatundew, u/Scalpturio,