If a god created humanity, then it created half of all that humanity as one gender (male) and half of another gender (female). And how was the latter half treated by the former half through history? Pretty badly, for the most part. It isn't surprising to find this trend continued among the ancient Hebrews, but should we expect an all-loving God to support and reinforce such misogyny?
Jealous Husbands vs. Jealous Wives
In Numbers, chapter 5, we find this god giving Moses commands about what to do with jealous husbands. The first thing to note is that this god apparently doesn't care about jealous wives - if they suspect their husband of infidelity, their god offers them no recourse.
The second thing to note is that the husband requires no evidence that his wife has been unfaithful. The whole passage is about a husband who is jealous, nothing more. He merely has to think that his wife has been less than faithful in order for him to bring her before the priests for testing.
And what's the test? The priest is to gather up dirt from the tabernacle floor, mix it with water, and force the woman to drink the concoction. With the state of sanitation at the time, I'm not sure I want to know what might have lived in that dirt - but any woman with a jealous husband had to consume it. If she was guiltless, nothing would happen as a result of the cursed water. If she was guilty, she would become ill.
Such "trials by fire" were not uncommon in primitive cultures - but should we expect an all-loving god of all humanity to encourage them, much less promote their use on only half his creation? The above is certainly not the only case where women are treated as being inferior to men.
Women Are Inferior
Suppose a man enters into marriage with a woman, but she does not please him because he finds something objectionable about her, and so he writes her a certificate of divorce, puts it in her hand, and sends her out of his house; she then leaves his house and goes off to become another man's wife.
If [the city] accepts your terms of peace and surrenders to you, then all the people in it shall serve you at forced labor. If it does not submit to you peacefully, but makes war against you, then you shall besiege it; and when the LORD your God gives it into your hand, you shall put all its males to the sword. You may, however, take as your booty the women, the children, livestock, and everything else in the town, all its spoil. You may enjoy the spoil of your enemies, which the LORD your God has given you.
Speak to the people of Israel, saying: If a woman conceives and bears a male child, she shall be ceremonially unclean seven days; as at the time of her menstruation, she shall be unclean. Her time of blood purification shall be thirty-three days; she shall not touch any holy thing, or come into the sanctuary, until the days of her purification are completed. If she bears a female child, she shall be unclean two weeks, as in her menstruation; her time of blood purification shall be sixty-six days.
A man can divorce a woman merely because he finds something, anything, objectionable about her. A woman, however, appears to be stuck no matter how objectionable the husband is. Women are treated like war booty - if they are virgins, that is. Although this may be preferable to being killed like all the men, it does indicate that virgin women are regarded as little more then property. Bearing a female child renders a mother unclean for twice as long as bearing a male child - apparently, this god views women as being inherently unclean and less worthy. It is not to be wondered at, then, that only men could be priests.
It should not be surprising to find such laws among those written by humans from other cultures - in particular, men. Humans are prejudiced against those who are different, and men have long harbored prejudices against women. Some prejudices have continued to this day. But would a god worthy of even a modicum of our respect really promote laws which treated half of humanity as property and less worthy than the other half?