It'd be common sense in any 2-bit production facility to give your goods at least a cursory test of sorts to make sure it does, in fact, operate as advised. It'd make no sense to put a Port in a desert because you'd need to move it to water in order to make sure it doesn't sink right away or some such, whereas if it's already at an ocean...
Since we're arguing hypotheticals... Assume the Desert Port contains a "lock" which, while a huge waste of power and resources to deal with that much water, is perfectly capable of testing for seaworthiness.
Perhaps have a port or other water-based facility that isn't in a water square - a river, swamp(???) or ocean - cost more to build and maintain, and take up more power? Forces you to consider whether it's worth it, adds another dimension to the planning process.
I'd like to add that a Port cannot produce ships, only a Naval Shipyard can (unless things have changed in these years in Combine). And iirc, Shipyards do have the terrain requirement and can be built only on water squares.
given terrain restrictions would a port and its city have to be on a river/ocean tile for watercraft to freely access it?
- yes, and you'd only be able to cross-terrain to a tile with river/ocean as well.
I assume that a landlocked port would just be odd and watercraft could only get in via airlift.