I live in York, where there are some very nice medieval walls. However, these walls have a few features that seem very strange to my intuition:
Are there any known reasons for these features? Are they common elsewhere, or is there something unusual about the situation in York that lead to them being built like this?
The important thing to consider with York, or really any surviving city medieval city defences, is why they survived and what that means about their fabric as historical sites. York's defences fell in and out of use from the Roman period to the early medieval, late medieval and early modern, and were rebuilt and modified many times, on top of the gradual effects of the passage of time and the needs of urban development. Most of the original ditches, which were considerable in size, have been filled in, for example.
The last large-scale workings carried out on York's walls were undertaken by the Victorians who, in depressingly typical fashion, cared not so much for actual history and archaeology, but for what looked nice and appropriately 'historical' while remaining neat and tidy and suitable for genteel visitors and tourists. These extensive works included the demolition of several barbicans, the widening, rebuilding or even completely new construction of walkways along the walls which historically would most likely have been made of wood, the addition or 'reconstruction' of most of the merlons to add crenelations to the walls, the addition of stairways for visitor access, and the wholesale construction of new lengths of wall and even a new tower - the Robin Hood tower - to improve the scenic views from the walls.