Is this like the wall of swords in Heroes of Might and Magic V? Damn, I forgot the property of this castle. When I just started playing Heroes of Might and Magic III, I even thought it enhanced ranged attacks.
It's useful for protecting ranged units, for example.