If I select some text and press Ctrl+C, it should copy the text I selected. The user intent is obvious. There's no excuse for the ability to hijack the clipboard to exist in the first place.
Web pages shouldn't be able to modify my selection. Why is there even an API for this?
The web ecosystem (including browsers) turned straight up malicious like 15 years ago, and users became nothing more than a product for everyone involved. That cancer has even metastasized and spread to the OS or even products that people pay thousands or tens of thousands of dollars for. I don't know how people who think that way can live with themselves.
To make “copy to clipboard” buttons possible.
On my phone, if I select text, my browser pops up a menu with "copy" as an option.
Why does a web page need to reinvent that wheel?
For the 1/10000000 case where it makes sense, how about a "X page wants to modify your clipboard" dialog? This has been a known security vulnerability for at least a decade.
Edit: actually, I just noticed that was a reply to selection, which makes even less sense. Just let the user select what they want.
The user tells their computer to do a simple thing, and the computer adversarially does not do that thing, and instead obeys someone else, intentionally. That should not happen.
If you went to a scissor factory and told them that their scissors were too sharp, they might at least think of doing a run of safety scissors. If you go to a tailor and suggest that, they will probably be confused and not very receptive.
Or if instead of things like the sawstop, we made power saws that sometimes just flip open the guard and swing the blade to toward the user. But there's a safety to prevent that, but it disengages whenever you start the saw, so you need to reengage it every time you cut something in-between starting the saw and actually cutting.
you already decided to hit enter while you are selection something, could be just a bit above your current cursor in the terminal
In a following snippet, the terminal scrolls 100 lines and prints no prompt, so a user is tempted to press Enter just to check what's going on. You can count this as a form of phishing, if you want.
Gnome shell doesn't AFAIK.
It's an odd thing to protect from; any program that has access to the X11 clipboard is going to be able to run a process as the current user.