And, in addition to @vzorglub, the string will rarely ever, if at all after first instantiation or after system start up, be UNDEF.
So effectively you are creating a rule that triggers once after the system started.
Commands do not directly change an Item’s state. But your Item does have autoupdate enabled, by default.
So autoupdate will see the command UNDEF issued by the expire binding, and do something about it. I’m not sure what it does, mind! Autoupdate’s job is to “guess” what might result from a command e.g send ON to a Dimmer and autoupdates says 100.
It could set the Item state to UNDEF or it might realize this is a String Item and make it “UNDEF”.
{ expire="1s,state=UNDEF" }
might work differently
Just saying there are subtleties at work here, your workaround looks like a better idea anyway. (as you can distinguish deliberate states from system invoked states due to error)
Edit - thinking on it a bit more, UNDEF isn’t a valid command to send to anything. Results unpredictable.