It isn't "stupid code." It is an optimization for speed.

If A = B Then Else C

will execute faster than

If A <> B Then C

That said, speed of execution usually isn't an issue. Habitual use of the former is poor style as the latter is more intuitive.