I just tested this and I get the same result.
If I make the first line of the script read
then it acts differently to having
Note that ./scriptname causes the script to execute by means of the interpreter indicated on the first line. The command "sh scriptname" causes the script to be executed by "sh" as interpreted, irrespective of what is specified as interpreter in the first line of the script.
In this light, you can also test this syntax:
This is interesting in the light of /bin/sh -> /bin/bash... These two files are basically for all practical purposes one-and-the-same. /bin/sh points to /bin/bash.
Strange, but probably defined and documented behavior somewhere in the annals. (There are many instances of Unix/Linux commands behaving differently depending on which "name" you used to call them)