According to Wiki, a sea shanty, chantey, or chanty is a type of work song that was once commonly sung to accompany labor on board large merchant sailing vessels. Of uncertain etymological origin, the word shanty emerged in the mid-19th century and became ubiquitous throughout the era of wind-driven packet and clipper ships.
Shanties were notably influenced by songs of African Americans, such as those sung manually loading vessels with cotton in ports of the southern United States. Shanty repertoire borrowed from the contemporary popular music enjoyed by sailors, including minstrel music, popular marches, and land-based folk songs, which were adapted to suit musical forms matching the various labor tasks required to operate a sailing ship. Such tasks, which usually required a coordinated group effort in either a pulling or pushing action, included weighing anchor and setting sail. The switch to steam-powered ships and the use of machines for shipboard tasks meant that shanties gradually ceased to serve a practical function.