Environments separate where you test and datasets separate what data you test with. Technical variables are resolved from the component and execution context to avoid hardcoded URLs, users or IDs.
For automated tests, this separation is key. A script that only works on one person's machine is not reliable automation.
Not all values should be visible to everyone. Credentials and tokens need careful handling, appropriate permissions and cautious logging.