Actually I understand that we need to use it to help the computer define that this is BASH scripts, but why does it work even without this string? I tried to run script file on my computer, and I did not type this string to define bash script, and it worked.
We learned that we have to add a permission to the files to allow them to be run. But I did not have an error even if I had not write this string chmod +x script.sh.
So I do not understand why do we need to write these strings, if everything will work without them?