This is a Z Shell module known as "url-quote-magic" in action. It is trying to ensure that you end up with what you intended even though you completely ignored shell metacharacters and quoting. It detects when (in ZLE) an unquoted word looks like a URL, with a schema on the front, and changes the way that character self-insertion happens to the rest of the word.
If the paste operation had simply entered
into the command-line editor, you would have ended up with a command that when run
would have tried to perform filename expansion and fail to execute
because no filenames matched. A well-known example by Vivek Verma
~$ mpv https://www.youtube.com/watch?v=HcgJRQWxKnw
zsh: no matches found: https://www.youtube.com/watch?v=HcgJRQWxKnw
Remember: The Z Shell has a lot of filename expansion characters — not only including
*; but also
= (command name search),
> (number ranges),
#. And that's not even including the Korn shell compatibility mechanisms. See the zshexpn manual page for the quite lengthy details.
url-quote-magic determined that this wasn't a quoted word, recognized the
http: schema prefix, and changed the
\= so that they wouldn't invoke filename expansion.
So unless you actually want, for some reason, URLs that you've pasted or typed in (without your adding any enclosing single quotes, note) to be subject to all of the filename expansions and either fail to work or (in the rare extreme surprise case) produce unexpected matches, you should probably be glad that this automatic quoting of shell metacharacters in what you clearly think of as URLs is being done for you. ☺