The reason is that every script/process has its own environment (scope) and using the export statement it can transfer variables or functions to its child processes, but not backward to the parent shell. You can achieve this task by "sourcing" the script, not by "executing" it. In bash this means:
where the dot is the source command. In this way all the statements inside the script are simply executed in the current shell and all the variable assignments are in effect.
This is the reason why environment variables are defined in configuration files like /etc/bashrc, /etc/profile or $HOME/.bashrc and $HOME/.bash_profile. These and/or other files are sourced (not executed) every time you start a new shell session. Hope this helps.