First, I think there might easily be some psychological differences between the sexes that are genetically based, albeit a bit flexible in terms of how they are expressed behaviorally. I can't think of any at the moment -- I just now woke up -- but I do recall reading studies that suggest their presence. If so, then one of the questions to ask, on a case by case basis, is why such differences evolved in us? But rather than speak of their "purpose", I myself would speak of their "functions".
Second, it has long been my impression that men and women are by and far mostly alike but that we tend to focus on the relatively few differences between us. Indeed, it might be said that those differences obsess us at times to the exclusion of our similarities.
Again, a model that I use when thinking about the differences in any traits between men and women is "overlapping bell curves". For instance, suppose it were found that there is a genetic based difference between men and woman in how quickly each sex generally responds to a baby or infant's cries. I would generally expect that difference would be far from one sex responded to their cries while the other didn't. Instead, I would generally expect that one sex typically responded a bit sooner than the other, but that both sexes responded. Overlapping bell curves.
Now having said all that about biological differences between the sexes, I think gender differences -- which, as I understand the term -- are not biologically based differences, but culturally based differences, probably serve a few purposes, not all of which I would think of as beneficial to most of us.
For instance, the cultural perception of women as emotionally weaker than men seems to me to be more detrimental than beneficial to most of us, both men and women. But it also does seem to serve the purpose of helping to "keep women in their places" in the patriarchies that most of us live in.
Again, there are also in my opinion some culturally based differences that in themselves seem relatively benign. For instance, the tendency of woman to spend more time and effort than men in making themselves physically attractive seems to me in itself relatively benign, although -- and I can't emphasize this enough -- modern corporate propaganda has turned that cultural based gender difference into a cancerous monster! Benign it might be in itself, but it's now tremendously destructive in so many ways.