Local by default
A name assigned inside a function is local. That default is deliberate: it means a function cannot quietly change a name the rest of the program uses.
Why passing beats reaching
A function that reads an outside name depends on something invisible at the call. Passing that value in makes the dependency part of the signature, so the function can be moved or tested alone.