I don't know if the average resident on NYC benefits much from living near a cargo port. But there are significant benefits to living in coastal areas: water has a moderating effect on climate, provides either natural sewage outfall (or fresh water, depending), and brings in tourists. It's not a coincidence that the overwhelming majority of cities exist on sea or lake coasts, followed by navigable rivers, and that there aren't all that many choice locations left.