If God is, then God transcends human understanding of "male" and "female".
Assuming that God is the Creator/Creatrix of all things, then God must have access to both male and female qualities.
My sense of the matter is this:
The relationship between human males and females is a symbol, or metaphor, or echo, of the relationship between God and humanity. Thus, even though God's nature includes both male and female aspects, His is the "male' role in the relationship between us and Him. It is for thsi reason that we refer to Him in masculine terms. Not because He is "male" in the sense that we understand it, but because "male" is the closest human concept we have, to make (limited) sense of HIs role in our relationship.
What I've always wondered is, if the Christian God is supposed to be our Father and later our Husband, does that mean He's looking forward to a second Creation, an offspring of the marriage of God and Man?