Code:
//var -p %a abc $+ $str($chr(32),3)  | echo -a $len(%a) $sha1(%a)
//var -p %a abc $+ $str($chr(32),2)  | echo -a $len(%a) $sha1(%a)


You can see that both $len and $sha1 see the string changing depending on how you edit to add or remove spaces, because they're identifiers. So it's legit to consider the spaces as part of $len. If we had /len instead of $len, it wouldn't see the extra consecutive spaces.

Since /write and /echo are commands, we lose the extra spaces. It would be nice to have $echo and $write so a theme intercepting :TEXT: would be able to preserve spaces without using $chr(160) to fake it or using &binvars, as well as being able to write consecutive spaces to disk without using /bwrite.