Stone walls are substantial replacements for stakes and logs, as their cost shows. Better yet, they can be actively defended by warriors occupying the parapets, meaning only determined attackers can breach them with artillery fire or fight their way over them.