Humorous dialogues such as these were popular at social gatherings as well as being a vehicle for local dialect. Presumably extra verses could be improvised. Most versions are from England but it has also been found in the USA.
Notes by Gwilym Davies 13 April 2016