Because for the word fly in Portuguese, there is no masculine form. Mosca doesn't necessarily mean a female fly, it's either. If you want to specify, you have to add in the Portuguese word for either "female" or "male". Hope this helps!
You forgot to mention those words are "fêmea" (female) and "macho" (male) :)
Example:
Os hábitos de alimentação das moscas-macho são diferentes dos das moscas-fêmea. The feeding habits of male flies are different from those of female flies.