To best of my knowledge, God has no definite gender, i.e., he's neither male nor female. Still, Jesus, God the Son, assumed a male form during his ministry. Why is that? Clearly, God the Son could have also assumed a female form, or even a genderless form. Given that, why God the Son choose to represent him as a male?
Humanity was, originally, made in the image of God. Thus was man made, in the beginning, Genesis 2:7.
Having done so, and man having been created, woman was made to be 'an help' for the man, Genesis 2:18.
This further, creative, step expresses something more of God's ultimate intention in creation.
For, ultimately, as all scripture in its progressive unfolding reveals, God's purpose is a body of persons, which, in the future, shall 'neither marry nor be given in marriage', Matthew 22:30, and shall be 'all one, in Christ Jesus', Galatians 3:28.
Thus man and woman both show forth different aspects of Deity and the ultimate purposes of Deity, in humanity. That is to say, during time, within the present creation, before that which is to come in the future, beyond time, God's purpose is expressed in the things which, presently, he made.
But he who made them is above that which he made. He who made all things is not bounded by, or constricted by, the order that he created in expression of himself. That order demonstrates things about him. It does not encapsulate he, himself.
As Jesus said, John 4:24, Pneuma ho Theos; 'Spirit, the Deity' (expressing an equivalence) or (in idiomatic English) 'God is a Spirit'.
'Gender' relates to human manifestation. It does not relate to Divine Spirit.
But God, and God's purposes, may be perceived and understood in the things which he has made, humanity - both male and female - being one very important aspect of what He made.
Jesus Christ, come in the flesh, 1 John 4:2, is a manifestation of Deity in humanity ; 'God was manifest in the flesh', 1 Timothy 3:16 [TR/KJV].
His coming does not represent the Body which was yet to be revealed ; The Church.
The Body, the Church, the Bride, is the complement of all who repent and believe the gospel and follow Jesus Christ. That whole complement of persons is seen set forth, in concept, in the creation. And, throughout scripture, femininity and womanhood demonstrate what all of God's people (as one body) shall be for Christ, the Head over all, 1 Corinthians 11:3, Ephesians 1:23, Revelation 21:9, Ephesians 5:22-32.
They - all of them, who believe - are the reality of that which is represented by created femininity.
(All references are to the TR Greek Text and to the KJV.)
So St. Thomas Aquinas approached this question in the summa asking if Christ is two persons or one:
Now some placed two supposita in Christ, and one Person, which, in their opinion, would seem to be the suppositum completed with its final completion. Hence, since they placed two supposita in Christ, they said that God is two, in the neuter. But because they asserted one Person, they said that Christ is one, in the masculine, for the neuter gender signifies something unformed and imperfect, whereas the masculine signifies something formed and perfect. on the other hand, the Nestorians, who asserted two Persons in Christ, said that Christ is two not only in the neuter, but also in the masculine. But since we maintain one person and one suppositum in Christ, as is clear from III:2:3, it follows that we say that Christ is one not merely in the masculine, but also in the neuter.
He says that the genderless is something unformed and therefore imperfect, but the masculine represented something "formed and perfect". This is in reference to a man with a physical body, not beings without bodies. If you've ever seen Kevin Smith's Dogma (which I don't recommend in the least), you'll know that a genderless physical conception of an angel in the form of a man is pretty odd looking and God wouldn't come to earth to be odd looking.
Everything that God created exhibits His character and attributes as a concrete analogy. This includes that relationships within the trinity and relationship between God and His creation. An analogy is not the same as the thing to which it refers. Only certain features of that analog or the context in which it operates are salient. The rest are incidental. When studying the parables of Jesus, for example, early Christians found fanciful connections between the minutest details of the stories and doctrine.
Thus we have the idea of a father, the defining actions of a father, the relationship of a father to a son and son to a father, and our creation by God as an analog to His existence. Not everything about us (such as the mechanics of sexuality) is a representation of God - but some of it is. There is something fatherlike about God and the Bible reinforces that relentlessly. There is something sonlike about Jesus, and in his case even moreso since he took on flesh.
Our society is massively confused about what Gender is. Given that situation, since we cannot properly define gender for ourselves as creatures, how can we say that God either has or does not have a gender?
Given God is genderless, why Jesus (God the Son) assumed a male form?
The answer to this question can be found in the proto-evangelium which is a Holy Decree coming from the Almighty and Omnipotent God. The Logos the Second Person of the Holy Trinity will come as a child, the first offspring of a chosen Woman.
Genesis 3:15 Douay-Rheims 1899 American Edition 15 I will put enmities between thee and the woman, and thy seed and her seed: she shall crush thy head, and thou shalt lie in wait for her heel.
But, this understanding is After the Fall of Man. We need to see the origin why God chooses to personified as a Man, and had chosen only a reflection of His image on a Woman. God created mankind in His own image both male & female. It's like the Sun and Moon analogy coming from the Church Father's teachings. Jesus symbolizes the sun while Mary is the moon reflecting the light coming from the sun.
Genesis 1:27: “So God created man in his own image, in the image of God he created him; male and female he created them.”
So, the answer to your question, why God assumed a male form, is because after the Fall of Man, the Holy Decree of God the Father is that the Logos must be incarnated in the chosen Woman as written in Genesis3:15
To extend it further in eternity, before Adam & Eve fall, and even before the Heavenly Host was created, and even before the creation time begun. The reason why God chooses to become a child can be found in the Greatest Commandment of God both in the Old and New Testament.
The Greatest Commandment …36“Teacher, which commandment is the greatest in the Law?” 37 Jesus declared, “‘Love the Lord your God with all your heart and with all your soul and with all your mind.’ 38This is the first and greatest commandment."(Matthew22:37)
The Greatest Commandment …4Hear, O Israel: The LORD our God, the LORD is One. 5And you shall love the LORD your God with all your heart and with all your soul and with all your strength.
As, Ven, Ab. Fulton Sheen said, "Love begins with a dream". God in eternity had a dream, God desires to be love, and he desired to be loved by a chosen Woman. God wishes to experience the love of a chosen creature, a Woman. God dream in eternity was to be love by a chosen Woman. That's why the icon of the Madonna, is God vision of love in eternity, God sees Himself in the arms of a loving Mother, that is God's dream in eternity. But the God exist in the Holy Trinity, and so the chosen creature must love God the Father, God the Son and God the Holy Spirit.
Mary the chosen Woman in eternity is the only creature that had fulfilled the Greatest Commandment of God of loving Him with all Her heart, with all Her soul and with all Her strength by Her Fiat from "womb to tomb".
Mary became the "beloved" daughter of God the Father in the Temple of God for ten years.
Mary became the "beloved" Mother of God the Son for 33 years in Christ redeeming mission.
And Mary, became the "beloved" Spouse of the Holy Spirit from 33AD starting in Upper Room up to Her death and Assumption into Heaven and continuous today in the mission of the Holy Spirit in the salvation of mankind.
Mary had fulfill the Greatest Commandment of God in the Most Holy Trinity. And this is the desire of the Almighty God in eternity before the creation time begin. The icon of the Madonna is the vision of God in eternity. Jesus the God-Man, existed in the bosom of the Father, while Mary the chosen Woman existed in the heart of God in eternity, because Mary is God's dream in eternity. God had created the Heavens and the Earth because He wanted to fulfill His dream, but a dream involves a sacrifice, and so, in eternity God saw that in order to realize His dream, the Fall of the Angels will happen, and a fallen mankind needs to be redeem. And so, to realize God's dream, one need to offer a sacrifice. And, God the Father heard a voice, as St.Alphonsus described in his book, the Son of God existing in His bosom said, "Lo, here I am send me".
In closing, when one look at the image of the Madonna, we need to ponder it with joy, because God in eternity was moved to create the Heavens and the Earth, all because of the joy God felt in making himself a little child carried in the arms of a "loving and merciful Mother". Mary is God's dream in eternity.