Short answer
Because Arabic, like English, has no neutral "it" for a living being, and the masculine form is the default. The Quran uses "Huwa" (He) as grammar, not to say Allah is male. Allah has no gender, no body and nothing like Him (42:11). He also calls Himself "We" to show majesty, not number.
Sunni creed holds that Allah is free of body, gender, parts and any likeness to creation. Ascribing gender, a wife or a child to Him is kufr. Muslims use only the forms revelation uses for Him: He, and the plural of majesty, We.
The four schools agree on this.
Explanation
Every Arabic noun is grammatically masculine or feminine, and the masculine is the general form used when no sex is meant. When the Quran says "Say, He is Allah, One" (112:1), "He" is the pronoun the language uses for a being with knowledge and will. Calling Allah "it" would suggest an object, so neither Arabic nor English uses it.
The Quran itself removes any idea of gender. Allah "neither begets nor is born, nor is there to Him any equivalent" (112:3-4). It asks, "How could He have a son when He does not have a companion?" (6:101), and it condemns those who called the angels Allah's daughters. Imam Abu Hanifa wrote in al-Fiqh al-Akbar that Allah is "a thing unlike other things": real, but not a body, not a substance, and not described by anything created.
The Quran often has Allah say "We", as in "Indeed, it is We who sent down the Quran" (15:9). This is the plural of majesty, the way kings speak, and it never means more than one God. In the same Quran He says "I" and "Me", and the oneness of Allah is its central message.
In English, Muslims usually write He with a capital letter as a mark of respect. Calling Allah "She" or treating Him as a force without will goes against how He describes Himself, since His names and descriptions are taken from revelation. See What does Allah look like? and Who is Allah?
The evidence
Quran, Surah Al-Ikhlaas 112:3-4
لَمْ يَلِدْ وَلَمْ يُولَدْ ﴿٣﴾ وَلَمْ يَكُن لَّهُۥ كُفُوًا أَحَدٌۢ ﴿٤﴾
He neither begets nor is born, Nor is there to Him any equivalent."
Denies offspring, parents and any likeness to Allah.
Quran, Surah Ash-Shura 42:11
فَاطِرُ ٱلسَّمَٰوَٰتِ وَٱلْأَرْضِ ۚ جَعَلَ لَكُم مِّنْ أَنفُسِكُمْ أَزْوَٰجًۭا وَمِنَ ٱلْأَنْعَٰمِ أَزْوَٰجًۭا ۖ يَذْرَؤُكُمْ فِيهِ ۚ لَيْسَ كَمِثْلِهِۦ شَىْءٌۭ ۖ وَهُوَ ٱلسَّمِيعُ ٱلْبَصِيرُ ﴿١١﴾
[He is] Creator of the heavens and the earth. He has made for you from yourselves, mates, and among the cattle, mates; He multiplies you thereby. There is nothing like unto Him, and He is the Hearing, the Seeing.
Nothing in creation, including gender, resembles Allah.
Quran, Surah Al-An'aam 6:101
بَدِيعُ ٱلسَّمَٰوَٰتِ وَٱلْأَرْضِ ۖ أَنَّىٰ يَكُونُ لَهُۥ وَلَدٌۭ وَلَمْ تَكُن لَّهُۥ صَٰحِبَةٌۭ ۖ وَخَلَقَ كُلَّ شَىْءٍۢ ۖ وَهُوَ بِكُلِّ شَىْءٍ عَلِيمٌۭ ﴿١٠١﴾
[He is] Originator of the heavens and the earth. How could He have a son when He does not have a companion and He created all things? And He is, of all things, Knowing.
Rejects ideas of Allah having a wife or child.
Where the ruling is recorded
- al-Fiqh al-Akbar (Imam Abu Hanifa), Section on the attributes of Allah. Says Allah is a thing unlike other things, not a body or substance.
- al-Aqida al-Tahawiyya, Section on Allah being beyond limits and parts. Affirms that Allah is beyond limits, parts and the six directions.
Checked by our team. For a more accurate answer to your own situation, consult a scholar. Quran translation by Sahih International. Hadith Arabic from the standard editions of the six books and the Muwatta, with gradings as recorded there; the English is our own rendering. Spotted a mistake? Tell us.