How does `alias sudo="sudo "` work? : <p>Looking at ways to pass current user's aliases to a <code>sudo</code> command, I found the following <a href="https://wiki.archlinux.org/index.php/Sudo#Passing_aliases" rel="noreferrer">on ArchWiki</a>:</p>

<blockquote>
  <h3>Passing aliases</h3>
  
  <p>If you use a lot of aliases, you might have noticed that they do not
  carry over to the root account when using sudo. However, there is an
  easy way to make them work. Simply add the following to your
  <code>~/.bashrc</code> or <code>/etc/bash.bashrc</code>:</p>
  
  <p><code>alias sudo='sudo '</code></p>
</blockquote>

<p>I don't get why this works. If the shell does not care how many spaces are between two commands, how can this have any effect?</p>

<p>When manually adding a space, I see no difference:</p>

<pre><code>$ alias e=echo
$ sudo e foo
sudo: e: command not found
$ sudo  e foo              # Manual space addition
sudo: e: command not found # Fail
$ alias sudo="sudo "       # Now with alias
$ sudo e foo
foo                        # Succeeds, but why?
</code></pre>

<p>Visibly aliasing sudo to sudo + space somehow allows passing aliases. This works on <code>zsh</code>, <code>bash</code> and <code>sh</code>, so it is not a shell-specific behavior. </p>

<h2>How does this alias work?</h2>
