This is a maritime ballad dating back to the eighteenth century and sung more recently by Sam Larner, among others. I learned it from a recording by the late Tony Capstick, who was a consistently great interpreter of songs and a very variable comedian; it’s a great shame that he’s now remembered (when he’s remembered at all) as a comic rather than a singer.
The drum-and-drone arrangement just grew, as they tend to. One of these days I’ll probably get a guitar and just use that for chords and rhythm, like most people do. But where would the fun be in that?