This song has the merit that all the repetition makes the song easy to remember, which allied with the dramatic build-up, make this a very widespread and popular song, versions of which are still being found on both sides of the Atlantic.
This appears to be a song with a considerable back story. European cognates of the ballad indicate that the tale is originally about a girl who has been captured by pirates who are demanding a ransom or else they will kill her, hence the string of relatives coming to see if they can free her. Inevitably it is the lover who comes up with the ransom. The folklorist Francis James Child found parallels of the ballad in many of the Scandanavian and Mediterranean countries but considered British versions to be “defective and distorted”. This does not detract from its popularity.
In British and American versions the element of piracy and ransom does not appear and one has the impression that the unfortunate individual is in jail and that bail has been requested which will lead to his reprise.
Hence the song is often called “The Maid Freed from the Gallows”, but the maid can easily be a man in most versions.