Below I run what I expected to be an invalid command: var=3 date, which in fact isn't.
$ var=3 date
Sun May 26 17:10:22 UTC 2019
$ echo $?
0
But the variable wasn't assigned the value 3:
$ echo $var
$
I expected to say that var=3 wasn't a valid command. What am I missing?