Complex sentence: Thus the scholar-bureaucrats came to the fore to keep track of the income and expenses of the granaries, around which walled cities, formed for reasons of defense along with ease of administration, kept invaders out and ensured that citizens remained within.
Split into simpler sentences: Thus the scholar-bureaucrats came to the fore to keep track of the income and expenses of the granaries. Walled cities were formed around the granaries for reasons of defense along with ease of administration, keeping invaders out and ensuring that citizens remained within.