To date, no one has explained why there are two genders, what the origin of said genders were and why a machine-based species even bothers having remnants of a dimorphic species (reproductive genders) if they were always machine-based having no previous organic origins.
"Boys Toys"
For a dozen years, female Transformers weren't even acknowledged as even EXISTING. Bob Budiansky, one of the premiere writers of the early Marvel comics versions acknowledges this in an interview. To his credit, there were early notes indicating he wanted there to be female-gendered Transformers before Hasbro said, no:
- Well, I remember bringing up that question early on with Hasbro, "are any of these female?" And then I think Hasbro's attitude was, 'this is a boy toy. We don't wanna have, you know, girl robots.' So, I said, "OK, just want to clarify that." --Bob Budiansky, Rusting Carcass interview
In most of their depictions, female-gendered Transformers were not shown or barely shown to exist. The manufacturers of the original toys admitted the toys were developed for young boys and gender wasn't really a factor in their design.
Budiansky was the lead writer for their most famous incarnation in the 1984 limited series, The Transformers. He would later write the longer running series until issue #55 (when he started to burn out due to having to shoehorn so many new characters into so few pages). This was the same reason few writers were willing to pick it up after he stopped.
Because it was a book intended to sell toys, Transformers featured an ever-rotating cast. New Transformers were often hastily brought in to meet the demands of Hasbro, and older "product" was often swept aside or killed off en masse in epic, climactic battles.
The Transformers, the monthly comic book published in the U.S. by Marvel Comics, was the very first original fiction to feature the famous robots in disguise, as well as the longest-running.
It started life as a four-issue, bimonthly limited series in 1984, but proved so popular that it continued publication as an ongoing monthly until spring of 1991. The series ultimately reached 80 issues and spun off several miniseries.
The series established the Marvel Comics continuity, which would form the basis for several successor stories over the years, including the Generation 2 series published by Marvel themselves only two years later, and the Regeneration One series which would reunite the creative team from the latter days of this series.
Media Shift
By the time the Generation 1 Transformers were being put on Television it had been decided again that there were no female Transformers. Except where they were drawn in the backgrounds or would mysteriously appear and disappear in a single episode. Such inconsistency only added to the frustration of the viewers.
Female-gendered Transformers would appear in the Beast Wars series without explanation or comment. No one (except maybe feminists who had been asking why there weren't any females) seemed to notice or care that suddenly female Transformers seemed to now exist.
As often is the case, a fuss about whether there should be female machines was basically ignored/accepted because a writer said it was. The more popular the series grew, the more likely writers were to create "female-gender" Transformers when it was translated to other media.
There was no further conflict until the Transformers became a live action movie and no one wanted to explain the Transformer Birds and Bees, so it became a decision to make them all "genderless - and thus voiced by male actors..." The Autobot Ironside was originally slated to be the female-gender character Arcee.
You can see the sordid UN-history of female-gender Transformers at the Transformers Wiki.