FWIW, "piracy" of copyrighted works and maritime piracy are completed unrelated legal concepts. Piracy in this context is just a rhetorical euphemism intended for moral framing, and doesn't have any meaningful legal import, notwithstanding that lawyers and judges use it like everybody else.
Relatedly, see Stallman's essay, Did You Say "Intellectual Property"? It's a Seductive Mirage: https://www.gnu.org/philosophy/not-ipr.html While courts understand "piracy" is euphemistic, the phrase "IPR" has been quite successful in shaping legal theories and jurisprudence.
EDIT: The correct word here isn't euphemism, but dysphemism. TIL. https://en.wikipedia.org/wiki/Dysphemism