Defense seems always the most economic way when the defender is resourceful. At the same time offense seems a better strategy for attackers who have nothing to lose.
And when your capital city has a unique geography that makes it both difficult to attack and guaranteed to be a center of commerce.
I love all the giant old stone walls in Istanbul, the place is filthy with them. The people are totally used to it too - it's trippy to see schools and homes built around centuries-old ramparts.
It seems similar in business cases.