> The UN figures include a mixture of city proper, metropolitan area, and urban area.
https://en.wikipedia.org/wiki/List_of_largest_cities
I haven't looked into the details of that definition.
But there is a somewhat standard definition to "metropolitan area" derived from something like "area where there is at least X per square km"
So it's not related a somewhat random definition of a "city" and its borders.