Because when you run a script, the parent shell (the one you run your commands from) starts a non-interactive shell to run your script which has interactive flag disabled i and only turns on two options
-hto locate and remember (hash) commands as they are looked up for execution.-Bto allow the shell to perform brace expansion
You can see the complete list of set options which will be seen in the output of $- - The Set Builtin
Other options available in the interactive shell, -i to indicate to run the shell in interactive mode
-mto allow Job control-Hto enable!style history substitution