Edit for those interested:
tl;dr: "asynchronous clipboard API" [0]
Overtly, it's used by shit news sites like WSJ, nytimes, and bloomberg to inject their shit into your clipboard when you copy-paste. A common thing I've noticed is selecting text, copying the text, and then pasting somewhere and seeing a link to the original article instead.
I'm not sure if they're still doing it; there has been several people complaining about this over time [1] [2] [3] [4] [5] [6]. I found this awesome article on the Security StackExchange from 2013 [8].
Also it's not just javascript. You might be forgiven to think that using a command-line interface would spare you. Unfortunately you'd be wrong; mosh, tmux, vi, emacs all support your terminal emulator's clipboard events. [7] [8]
[0]: https://www.w3.org/TR/clipboard-apis/
[1]: 4 months ago: https://news.ycombinator.com/item?id=22352674
[2]: 4 months ago: https://news.ycombinator.com/item?id=22446940
[3]: 8 months ago: https://news.ycombinator.com/item?id=21377598
[4]: March 2019: https://news.ycombinator.com/item?id=19384895
[5]: December 2017: https://news.ycombinator.com/item?id=16034854
[6]: September 2015: https://news.ycombinator.com/item?id=10301881
[7]: Three months ago: https://news.ycombinator.com/item?id=22815757