The dynamic nature of animal societies often hides multiple layers of complexity. The field of animal behaviour is rapidly advancing with the development of increasingly sophisticated analytical methods that allow scientists to identify complex and nuanced drivers of social patterns. The resurgent interest in giraffe sociality illustrates this by challenging the early view that individuals interact at random; it became clear that, instead, giraffes can be organized into multilevel societies, apparently founded on preferred associations. However, it is unclear whether such enduring associations result from active choice for specific individuals. The extent to which other social and asocial factors can contribute to an individual's inclusion in groups remains underexplored. Here we assess how context affects social preferences at the individual level by evaluating grouping patterns of giraffes in different behavioural states, habitats and levels of disturbance. When we controlled for potential class-based (as opposed to individual-based) assortment of individuals by sex, age and gregariousness, we found that giraffes only exhibited individual social preferences when foraging, with minor influence of habitat complexity or level of disturbance. Our results indicate that behavioural context is a major driver of giraffe social association. This strengthens recent evidence of complex social systems in giraffes and suggests that classic metrics of social relationships (such as association indices) may be too coarse, concealing true social preferences in wild populations.