You Want to Make a Fantasy World: Part XLIII - Cities
First off all, we need to make a distinction.
Villages: The houses of farmers, or other resource gathers, clustered.
Town: In the modern era we have the concept of a township, which has it's own charter, but historically, there is nothing even remotely similar to this. Instead a town is a step bigger than a village, typically located on trade routes. Towns typically have tradesmen and merchants. Lords would often put administration in the towns, but they don't need to, and it's really up to personal choice. You'll also often find temples and churches.
Cities exist because of unbridled hubris.
Farming villages, (the majority of villages), feed themselves. Towns are a step above, and are fed by their surrounding villages.
Cities cannot support themselves. And cannot in any conceivable way without some sort of vertical Hanging Gardens. Instead, they are either trade cities, supported through trade, or administrative centres, supported through tribute.
And, contrary to popular belief, most cities are prone to collapse. If administrative centres cannot maintain the tribute, they collapse. Trade cities don't actually produce anything. As such, they are entirely dependant upon the success of both sides of the trade. Even worse, living in cities restricts your space, effectively eliminating storage space. Many city dwellers didn't even have their own cooking pots or utensils, and were entirely dependant upon food stands.
A single drought could often doom a city, and it would be abandoned. Later on, others would occupy the city, largely for the same reasons it was originally occupied. Rome was known as the Eternal City, because - it did -NOT - collapse. There are maybe a couple dozen cities to be consistently occupied throughout Human history. First Mesopotamia, then Ionia, and then Greece. China had a few persistent cities, and then there was Samarkand in the middle.
There are no accidents with the Force. There are no accidents with Primes. And there is no accidents with cities. They are 1000% intentional, and often only maintained by a powerful, central ruler. Cities were often created by a successful king/emperor as a place to store their tribute. The wealth then leads to people that can survive off of wealth, which basically means everyone but a farmer, (most people throughout the vast, vast majority spent most of their time gathering food.
And this is how cities would grow. The original territory, which was occupied by those supporting the king, such as nobles, priests, bureaucrats, etc., becomes the royal/noble quarter of the new city. With lower value areas typically based off the proximity to the noble quarter. The closer you are to the outside, the closer you are to the rampaging barbarians. The walls protecting the inner city would often be maintained, allowing a defence in depth, using the paupers as cannon fodder.
And this is where No Quarter comes from. When you siege a city, you would often negotiate about which quarters you were allowed to loot and pillage. Anyone not in the agreed quarters could be killed or enslaved. If the city fought back too hard, it would often end with No Quarter, i.e. "the strong do what they can and the weak suffer what they must".
Cities are sited on purpose. It might be near a river or sea port. If you have low-land plains, you want to use them for agriculture, which means a rocky headland would be the perfect place to site a city. It might be nestled into the mountains for defence, it might be along a major crossroads. Unless they can build magical hanging gardens inside the city, for which my go-to is usually Gnomes, though Ba Sing Se is the Chinese Imperial version of it, then it needs surrounding agriculture land.
The Chinese, and subsequently Japanese don't really have much in the way of plains. As such, they had to dig their cities out of the mountains for thousands of years. This is why China's primary focus has been on stability.
Rome's answer was completely different. They knew they were the new kids on the block, and so hired the best of the best from around the (known) world. They built, and expanded. Pompey Magnus needed only to stamp his feet, and legions, (8,000 - 10,000 strong), would spring up over all Italia. But, in the beginning, it was only seven hills. The hills were defensible, and surrounded by lowland swamps, which they used for trade. They eventually unified, and a built a wall around the seven hills. The wall, or the shadow of the wall, was an important part of Roman Law until the collapse of the Western Empire, even as the city dramatically expanded beyond it, and even as the wall itself was removed.



















