Actually this is "regular behavior" for the vi (or vim) editor.
If you start the command with an exclamation mark it will be passed to the shell and executed there, so for example
:!ls
will show a listing of the current directory (and ":!wq" leads to an error message as the shell does not know about a comand called wg).
The exclamation mark at the end of the command however just means to force the command, so
:wq!
will write and and quite even if the file is marked as read-only (assuming the user has the appropriate permission to perform the taks) and
:q!
will exit without saving even if there are unsaved changes.
If this did work differently on ESXi in the past I can only guess that the vi was so limited that it didn't support the execution of shell commands and instead it used the "force" meanining of the "!" regardless of its position.
Regards,
Carl