I think it traces back to Henry Avery and his capture of the Mughal treasure fleet [1]. It inspired an entire oral/print tradition and social zeitgeist in England (and the rest of Europe) which IMO directly led to an entire generation of privateers like Woodes Rogers and tied into the whole golden age of piracy, an endless source of drama for fiction authors.
[1] https://en.wikipedia.org/wiki/Capture_of_the_Grand_Mughal_Fl...