From The Man Who Lied to His Laptop by Clifford Nass and Corina Yen:
Ironically, while companies focused on team-building exercises spend enormous sums of money in the belief that team formation requires special locations and tremendous effort, social scientists have found ways to reliably create teams out of randomly selected people in a very short time. What are the secret ingredients in the social scientists' “special sauce”? Identification and interdependence.
The idea behind identification is that personality similarity is not the only means of bonding. Similarity-attraction, probably the most well-established principle in all of social psychology, dictates that you will feel bonded with anyone who is similar to you on almost any dimension. Thus, when team members share one or more characteristics that they generally do not share with those outside the group, it cements the group together.
Along with identification, the other key factor for creating a sense of team is establishing interdependence. To create interdependence, research suggests that team members must share two beliefs. First, they must feel that achieving the group’s goals will also serve their own personal goals. Second, team members are integral to the success of the team.