On primary relations at tree-level in string theory and field theory