The -script mode is an interface to the wolfram.exe's -script mode, which is a command-line version of Get. It essentially rewrites the command line, launches a kernel using the equivalent command, and then exits. It can only ever be used with a local kernel, and $ScriptInputString will always be None.
In -file mode, wolframscript.exe launches a slave kernel (either local or cloud, depending on options) and then handles the buffering between the various streams to inputs and outputs end up in the correct place. It reads in the commands from test.wl and then feeds them to the kernel. This allows it to not only provide $ScriptInputString, but provide it differently in -linewise mode.
So as you can see, the two modes are quite different.
As for the particular difference you spotted here, the behavior is technically correct. Since kernel is not in the middle of Get when it evaluates the contents of the file, \$InputFileName is an empty string. Compare, for example, the behavior of 'wolfram.exe < test.wl' versus 'wolfram.exe -script test.wl'. Morever, if you're using a cloud kernel, does this \$InputFileName even make any sense, and should it be available?
OTOH, this is a very technical and somewhat confusing distinction (which I had to think through before writing this answer), so I will file a suggestion so we investigate whether the situation can be improved.