Beijing has multiple rivers traversing the current municipal area, and they were dammed and directed into channels, or directed underground as the city grew (same for London, by the way - London has multiple historical rivers that are now entirely or almost entirely underground, not just the Thames)
London, Rome, Athens, Lisbon, Dublin, Istanbul, Amsterdam, Venice, the list goes on and on (with the last two historic capitals being right in the water, not even coastal; and while I'm aware that Venice is not a capital these days, theirs was a formidable empire)
Good harbors happen to be full of wetlands. The current reality, where there are practically no wetlands near large coastal cities, is very artificial.
See this height map of China and see how the less populated areas are simply too high: http://chinatoursandholidays.com/sites/default/files/styles/...
I'm guessing that there are a lot of inhabitable places in the US that are just... not.