Perhaps God simply wanted to test the charity of everyone toward everyone else without regard to gender. God is certainly no respecter of persons, but He inspired the writing of the Book we call the Bible and He created both male and female.
For what God thinks about charity see these verses:
1Co 13:4 Charity suffereth long, and is kind; charity envieth not; charity vaunteth not itself, is not puffed up,
1Co 13:5 Doth not behave itself unseemly, seeketh not her own, is not easily provoked, thinketh no evil;
1Co 13:6 Rejoiceth not in iniquity, but rejoiceth in the truth;
1Co 13:7 Beareth all things, believeth all things, hopeth all things, endureth all things.