I truly have no clue what it means to be a man. There is nothing I can put my finger on and say ‘Aha! This is what it feels like to be a man!’
How do you feel when someone insults a woman you care about? I'm thinking that response, mediated by testosterone, is what it feels like to be a man.
Maybe a trans man could weigh in on that question. Obviously, something makes a person born with female parts feel enough "like a man" to consider himself one.
The "purpose" (i.e., evolutionary benefit) of gender is obvious. It's a method of specialization, which confers a selective advantage on members of a group that practices it. All such benefits are contingent on environmental factors. Sometimes specialization is crucial to survival, and sometimes it is disadvantageous. Over the evolutionary spread of human existence, however, it has apparently been a net positive, as, otherwise, it would have disappeared.