Shell parsing is hard.
Yes, shell parsing is non-obvious - it does help enormously to understand that the shell takes what you type on the command line after you hit enter, parses it, replacing variables, expanding globs (wildcards) and other language constructs in the process and only then issues a system call, passing the resulting argv structure to the kernel for execution.
Exhibit A (source of the above quote): How the local shell ssh and the remote shell interact, in unexpected ways