The dirty secret of file operations is that extensions really don’t matter much - as
@gothburz says, 7-zip is scanning the first few bytes of the file to match on the
magic numbers of the 7-zip header, and so 7-zip will extract that archive happily despite its extension being malformed.
I’m not sure who decided to open the contained files immediately after extracting an archive, but it seems like Windows has had problems with .wsf files in archives as a malware vector for a while now - so my guess is that this behavior is a Windows “feature” that comes from supporting the .wsf ecosystem (which can include raw .js files as well).