There's a theory that we're hardwired to be drawn to shoreline, as accessing the resources of tidal zones would have been a definite competitive advantage for our ancestors.
Our natural obsession with tracking the moon also plays into this, as a way of predicting when tidal conditions are best to forage/fish/etc.
It's analogous to the theory where marathon hunting contributed to our physical endurance, brain power and predictive abilities, upright running, sweating, etc.
Both theories attempt to explain the general sense of pleasure we get from visiting the beach and long distance running, respectively.