Shebang changes how Unix-like OS run scripts, ensuring the script is run with the specified interpreter. In this case as the line was not the first in the file, users without bash as their default shell would experience issues running the script.
Fixes#9281
More details on shebang usage here https://en.wikipedia.org/wiki/Shebang_(Unix)