The Org Credential Is Creating a New Environment Record
Whenever an org credential is validated for the first time, the SFDC Org ID field is populated. The first Id in that field is the Id of the org you were logged in when you validated the org credential.
When the validation happens and that field is populated, Copado uses the first Id to search for an existing Environment record and associate the org credential with it. Copado will check the Org ID field in the environments.
If Copado cannot find an environment with the same Id, a new environment will be created with the same name as the org credential.
What happens if you validate again an existing org credential that was already validated and had the SFDC Org ID field? Copado will NOT update the field.
If you log in to a different org, the SFDC Org ID field won’t be updated with the Id of the new org.
The rest of the process is the same as that mentioned above, Copado will search for an environment using the Id in the SFDC Org ID field and will create a new environment if it cannot find one with the same Id.
If you are refreshing sandboxes, please follow the instructions included in the article Sandbox Refresh to make sure the org credentials and the environment contain the right data.