What is the primary purpose of maintaining a 'chain of custody' for evidence in a security investigation?