Because zsh has usually the url-quote-magic feature enabled which automatically escapes all special characters typed or pasted if the current argument is identified as URL.
Most likely it escapes enough to prevent code execution, but last time I tried it didn't escape all special characters out of the box: