Sex is biologically determined, while gender is to a large extent enculturated, or learned.
Anthropologists were not always aware that male and female behaviors were to a large degree determined by culture. There has been a tendency for males to perform these roles. The degree of stratification often varies with differing adaptive strategies and levels of sociopolitical organization. This is clearest where females are producing most of the food for the household. Because foragers do not have developed institutions for warfare and long-distance trade, these are not factors in gender stratification.