The "goal" is to select the most socially able people. They become the most popular. By successfully navigating an ever-changing maze of social cues.
The "goal" is to make a social species that can live together in large numbers. Societies without that goal die, often horribly. So even without that as an explicit goal, they all have it.