At a minimum, the fortress walls both delay, and offer the high ground, allowing for farther range. Making attacking forces eat attacks until in range. Might not work on a dragon, but if the opposing army had to get one to win, your walls did a superb job. At that point they aren't fighting to...