One of the reasons it's so hard to estimate the population of pre-modern big cities is that the population was churning, people were coming and going all the time. They came in droves to find work and resources, to join kin and kith and compatriots (a big city is by default multiethnic), to be where the action is, to get away from some other place. And they left in droves to an early grave.
Seriously, the mortality in pre-modern cities was terrifying. A large chunk of it was due to disease, esp. contagious disease, which spreads so much easier in cramped spaces. It doesn't have to be as dramatic as the Black Plague, there are quite a lot of them! (I was idly checking recorded deaths in 1632 London, a non-plague year in the modern era, and more than 25% of them were from diseases we now have vaccines for.)
And another large chunk, as in the entire world before the 20th century (it's not city-specific), was due to child mortality. These numbers are staggering.
So in the real world, people mostly came to the city on purpose, and mostly left for reasons beyond their control. In a fantasy setting, the control goes to the worldbuilder. And the worldbuilder might decide that, for example:
- fewer diseases exist
- diseases are less contagious and lethal
- there are usually enough magic-users to contain the spread of a lethal contagion
- either way, when a hefty percentage of the city's population succumbs to disease, it's a plot point, not the norm
- there are enough healers willing and able to prevent those staggering numbers of child mortality
- under normal circumstances, magic and/or society is advanced enough to prevent large-scale famine and malnutrition, and to provide passable sanitation
- we're handwaving all of it because we're not making an elaborate well-thought "what if" scenario, we're only making a setting as background for a party of adventurers who kill things and take their stuff; all we really need is vibes