I can't give you a link to this because it has been a long time since I read it, but I've seen an article that might explain this. Apparently bronze age Mesopotamian homes were built to create increasing levels of privacy; your most public room, where you'd entertain guests, goes nearest the entrance to the house. Your second most public one might be your pantry and kitchen, which you might use to entertain guests but guests are unlikely to spend a lot of time in, so the only way to access it is via the first room. Then you'd have your private space, like your bedroom, and the only way to get to that is via the pantry.
Like I said I'm working off of hazy memory here, and Nebuchadnezzar is a fair few centuries later than the end of the period that the article was discussing, but I think I can see what looks like that idea of layers of privacy in the image.
Another thing re: wall thickness to think about is there wasn't steel-reinforced anything, and in an area without lots of trees, there wasn't much solid timber for beams either. So you get "structural brick" which has to be much thicker on the lower floors than the brick facades you see today, on buildings with steel support beams. Structural brick makes for FAT walls esp if it's supporting a 2nd story.
Privacy and to confuse invaders. Also, to maintain a solid structure that can hold up the roof. They have to build a structure system for the roof, no matter what. They're making the best of it.
Why do cities like those have organized perpendicular walls for buildings but then have seemingly random external walls that only sometimes match the inside?
My first thought would be to match the terrain, but this frequently happens on seemingly flat land too. Can't figure out a wording that gets an answer on a web search.
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.