Research involving more than 19,000 people shows favoritism can damage relationships for both the favored and unfavored.