Im not an expert on music by any means but I have more than a knowledge of history.
Most songs are cultural and when the lights went you there were few things to do other than dance, sing or find a corner with a loved one.
(Studies were done about the effects of rural electrication and the children per capita were haved when people could see each other.
Back the the current question. I have in my posession two records that I would suggest you would hard put to find any where, Oscar Brand? Sea Chanties Vol 1 and 2.
Oscar Brand,if I remember his name correctly, wrote that sea chanties derived from different needs. Some sea shanties told a story.
Like Paul Jones...
That starts out. A Yankee Ship came down the river, blow boys blow. It tells the story of John Paul Jones.
As opposed to some that were considered "short drag songs" which were sung while working and helped establish teamwork.
Pulling up an anchor is hard work on a capsain and so the men would sing and pull in time with the tempo.
I dont know a lot about sea chanties but they served a purpose. I suspect that every seafaring culture there ever was had sea chanties but they were useful.