Now that trend has somewhat flipped. The US has deindustrialized and offshored most heavy industries. Stricter environmental laws have reduced pollution. And civil engineering measures have somewhat reduced flood risk. So, now waterfront residential areas have become expensive and fashionable.
This is just a general trend. We will still see exceptions in SF and other cities.
It's kind of funny how you see the same economic patterns play out in different cities over hundreds of years
Another pattern is that train stations and big US post offices are often in the oldest parts of town, and I think they have started to move over the years. That real estate is often extremely valuable, so the govt or business finds something else to do with it