Since the execution of the source file is done in the invoking context, environment changed within apply to the current process or the current shell. This is very different from scripts run directly by shebang or as sh foo.sh, which are run in a new, separate process space, with a separate environment.
