History expansion is performed before variable expansion.
>From man bash:
History expansion is performed immediately after a complete line
is read, before the shell breaks it into words.
and
! Start a history substitution, except when ***followed by a
blank***, newline, carriage
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKA