Why are the twelve apostles all men?
God does not tell us why all the apostles were men. To attempt an answer is to speculate, as God did not tell us his reasons. So…. My response is just my own opinion, and you should take that for what it is worth.
There are several reason I believe that Jesus may have chosen only males as apostles.
1. His relationship with the apostles was quite intimate. It involved him spending a lot of time with them, including spending the night in close quarters with them. It would not have been appropriate for Jesus to have this kind of relationship with a woman. The same would apply to the other apostles as well. It would have been inappropriate for them to be in such close relationship with women to whom they were not married. I suppose Jesus could have made other arrangements, but this may have been a factor.
2. The relationship between Jesus and his apostles has very strong affinity between that of a rabbi and his disciples. In Judaism, this relationship was certainly reserved only to male rabbis and male disciples. For Jesus to break with this strong tradition in a Jewish setting would have been possible, I suppose, but it would have been quite radical and would have stolen attention from his ministry.
3. The apostles were chosen as witnesses who would be publicly preaching. Women are not given public preaching roles in Christianity, as can be seen from passages such as 1 Timothy 2:12.
4. The apostles all spent the entire rest of their lives in mortal danger. God may have chosen men only for the reason that it is more appropriate for men than for women to be subjected to such physical danger.
5. The apostles were a physical fulfillment as antitype to the twelve sons of Jacob/Israel. The twelve sons of Jacob were a foreshadow of the twelve apostles. I cannot speak for God here, but the choice of male antitypes to the male types may have been sufficient to determine that the twelve apostles would be male.
I will say this. Jesus chose male apostles not because of any gender bias on his part. When it comes to his relationship with women, Jesus was a radical revolutionary for his time. He had an intimate conversation with the Samaritan woman at the well, even though she was Samaritan and a woman of ill repute. Jesus’ sensitivity to the needs of women and his willingness to talk to them is truly striking in light of the attitude of Jewish men toward women at that time. A number of women appear to have been even closer friends with Jesus, perhaps, even than some of the apostles. This would apply to Mary and Martha. A number of his closest associates were women and these women funded his ministry. The first witnesses to his resurrection were women. So, the reason God chose only male apostles is debatable, as God does not tell us, but we can be sure it is not because of any anti-female bias.