when you execute a script, it will be executed in a new shell, this way those variables will be exported in that subshell (and its descendants) only and they will not end up in your own shell, i.e., it will look as if you unset them automatically after the end of the execution of the script.