I would bet that the interior walls run in cardinal directions, but the exterior walls were built to fit with the rest of the existing structures surrounding the fortress. Fortifications were usually built where there is already a village to support them.
Theres is a bug in the current Dwarf Fortress combat AI where soldiers equipped with crossbows will only shoot targets if they can’t path to the target. If they can, they will instead prefer to run up to it and melee with the crossbow.
I believe you have found their reasoning.