Temporary all-male social groups are formed in a number of animal species. We examined 34 years of data collected from 36 male Thornicroft’s giraffe in the Luangwa Valley, Zambia, to test a set of predictions related to five possible functions of all-male herds (predator protection, practicing aggressive skills, prolonging life, nutritional demands and resource learning). We found that all-male herds were significantly smaller than mixed-sex herds, usually contained a mature bull, and were not dependent upon season or habitat. Dyadic associations between males in single sex herds were quite weak, with <25% of potential male dyads sighted together in an all-male herd. Our data are best explained as a resource learning strategy adopted by males to obtain more extensive knowledge about the habitat, including both food and female distribution. However, other benefits in the form of predator protection, dietary intake and sharpening competitive skills for future contests over estrous females also seem to mediate formation of giraffe all-male groups. We conclude that the primary advantage of roaming in all-male herds changes during the life history of males.