I always assumed they would learn from more experienced shanty singers, and join in.
But how did they introduce new ones? Somebody must have had the idea for one and started singing it, and the others would have joined in, or perhaps contributed to it, making it a joint 'composition'.
Much like football fans today, learning new 'chants', I would imagine?