I would be willing to bet that when Asimov first gave Trantor's population --- it was in one of the early Foundation stories, at least, possibly the very first --- he suffered a simple failure of intuition. I'm not sure he had ever even been outside New York City by that time, and may have just supposed the whole world was about as population-dense. (Don't laugh; I grew up in New Jersey, and can not get used to how in other states there are these big unoccupied nothings between cities, whereas a friend from Michigan didn't realize how long we were driving because we never passed into the regions of empty space and so instinctively felt we had just left even though we'd been driving an hour.) So therefore, someplace which was about twenty times the world's then-current population would be a really quite populated place indeed, with the surface being twenty Brooklyns stacked atop each other.
And then once given, the number would tend to stick whether it made sense or not, despite one point in I want to say Foundation and Empire where the population's accidentally listed as being ten times as great.
Still, it's odd he never turned to working out the population density of Great Science Fiction Planets, particularly in the 70s when he was doing science essays on most population-dense places in the world. Maybe he felt that'd be too far outside the science column domain.