Back in the day most cities started out as fortress cities, high stone walls and battlements, you needed farmers to grow crops to support the garrison, you needed miners and metal workers to dig up ore and then convert it into armor and weapons, etc etc.
There was rarely a military fort that didn't have a non military presence before basically the modern era.
To piggyback off of this point, urbanization was often explicitly driven by military and political authorities for their own purposes.
So, put yourself in the hobnailed sandals of one of these authorities. Say there's a geographical area you want to defend, because it controls a route into your core territories or perhaps because it dominates the surrounding landscape and makes it easier to assert your own authority. Naturally, you fortify a position somewhere in the vicinity and plant a garrison there.
This has knock-on effects. Your garrison needs food, and long-distance food supply is impractical. You want to grow or herd foodstuffs close by. So you need farmers in the area. That brings in more civilians; since the garrison is a convenient location to meet up (it's well-protected, and it reduces transport costs to sell in fewer markets), farmers can also sell any remaining surplus to nonmilitary buyers in the area.
Having the protection of the soldiers is also handy; if people are gathered in one place they are easier to defend, and it's in the soldiers' interests to keep their food lifeline safe. This doesn't just mean defense from enemy countries, but from bandits and so on, the likes of which were endemic throughout lightly settled areas throughout most of the world up to the last few centuries. Garrisons can then also act as law enforcement (gendarmes and other police institutions separate from the military being a largely modern innovation), with everything good and bad that that entailed.
Generally, only a ruler has the power to mint and coin legal tender, and the primary reason for her to do this is so that she can pay her soldiers. They are the largest item in the budget, and number two isn't close. It's primarily through paying soldiers that coins are disseminated throughout a kingdom: the soldiers are paid by the ruler, and then the soldiers use that money to pay for goods and services from civilians.
This means that a garrison is like a nexus of cash for enterprising traders and merchants. If you want to sell something, it only makes sense to sell to the people who have the actual money. So they start to settle around the garrison, forming villages and even cities. Concentrating trade in certain areas is also to a ruler's benefit, because it makes it much easier for her to tax that trade. Many rulers went to considerable effort to encourage the development of market towns, ports, and entrepots for precisely that reason, and one of the first steps in creating such a place would be the planting of a garrison.
Some of the most famous cities in history have been founded on such beginnings: Antioch, Alexandria, Baghdad, Fustat-Cairo, Berlin.
But conversely, the removal of that military support can have knock-on effects that cause those cities to evaporate like cat's urine on a hot tin roof. Babylon used to be the metropolis of Mesopotamia, but when subsequent empires conquered the region, they established competing cities that got royal patronage instead, and the predecessors got depopulated. When the Seleukid Empire founded Seleukeia-on-the-Tigris, Babylon turned into a ghost town. The same happened to Seleukeia when the Parthians founded Tisifon, and to Tisifon when the 'Abbasid khalifas founded Baghdad. Even worse, when the Roman Empire in the West fell apart, there was
nobody paying soldiers or coining money anymore, resulting in alarmingly rapid deurbanization in many places (especially Britain).
At any rate, the existence of Skyhold as the cockpit of the Inquisition - home to a garrison, military commanders, and undoubtedly large amounts of political patronage - would almost guarantee the existence of a village or town around the fortress. Just as a large army on the move generated vast amounts of camp followers up to the twentieth century, because tens of thousands of soldiers in one place is effectively a movable city, a large army staying in one place would draw in civilians to form an
actual city.