There's no in-Universe answer.
The Borg Queen was simply there to be a temptress and, yes, to draw parallels to insects as you pointed out.
One speculative thought is this:
Whatever Species 0 (original Borg species) was, she was a member and was the driving force behind their creation of the Collective.
The bodies fashioned for her could then be patterned on her original form, and she could be the 'personality' of the Collective.
It's speculation, but it's the only explanation
I can think of
that fits the facts.
scifi.stackexchange.com/users/656/Jeff
I think the writers were trying to strengthen the connection to the hive, bee-like elements of the Borg Collective.
In Star Trek: First Contact, it was revealed that Locutus was made to be both a connection to humanity, a species that the Borg were having trouble assimilating, AND be a companion to the Borg Queen.
The Queen having a gender makes sense because the Star Trek canon throughout the TNG run was not really able to deal with non-binary gender issues in a particularly thoughtful or open-minded way.
Being either male or female remained the 'default' throughout the universe at this time, so a 'female' Queen to a 'male' Locutus makes sense in the (pretty narrow-minded) universe they had been writing within.
scifi.stackexchange.com/users/2611/Katey HW
While the real world answer may have been to draw parallels to insect hives, the in universe answer may be as simple as thats what gender the host body was.
As far as I know only two Borg leaders have been seen in Star Trek and while both of them were female that isn't really enough data to draw any solid conclusions off of, considering how long the collective had been around.
scifi.stackexchange.com/users/1234/Xantec
The queen was initially of species 125, then got assimilated into the Borg queen.
It's never explained why she became a queen and not a leader.
The only presumable thing is in nature if there is a large colony its 90% of the time led by a female and workers are male (bee's ants
etc)Although
the Borg aren't insects, that's my only reason.
Just wanted to point out that the queen wasn't the first Borg and she wasn't species
0/1
scifi.stackexchange.com/users/8457/Matthew
I'm not an expert on Star Trek even a little bit, but a comment to one of the other answers links to Species 125 from the Memory Alpha wiki, which says: In the Star Trek:
Legacy segment "The Origin of the Borg", it is stated that the collective found the females of certain species (likely referring to Species 125) displayed a mental prowess, enabling them to sift through thousands of thoughts and bring order to chaos.
Star Trek: Legacy was a video game, and I'm not sure where that falls in the Spectrum of Trek Canonicity, but this suggests an in-universe explanation: the trait which allowed the collective to have a queen at all had some connection to femaleness in its origin, and some aspect of that femaleness survived assimilation.
scifi.stackexchange.com/users/10784/mattdm
In Star Trek: Destiny - the trilogy by David Mack - we learn that the Borg stem from a race known as Caeliar and come from a botched test to save human and Caeliar lives.
We are not informed whether any of these develop to become the Borg Queen.
However, we also learn that there is another Borg Queen that lords over a certain division of Borg.
This leads to speculation that there could be multiple Borg Queens for each hypothetical hive.
scifi.stackexchange.com/users/16831/Cyclops Eye
As I just  answered , Borg don't have sexual reproduction.  The Borg Queen seems to have replaceable bodies.  So why does she even  have  a gender (e.g. Borg Queen vs. Borg Leader)? She does have one - aside from the name; She keeps trying to turn males into her consorts (Locutus/Picard, then  Data ).  One possible guess is that show creators trying to parallel her to an insect queen. But this seems inconsistent - she should have been genderless.
Why does the Borg Queen have a gender?
scifi.stackexchange.com
<star-trek><borg>
scifi.stackexchange.com/questions/5663
scifi.stackexchange.com/users/976/DVK-on-Ahch-To
The Borg Queen was there to be a temptress and to draw parallels to insects. Another thoery is that this refers to the gender of the host body.  Though there is no in-universe answer the Borg queen was dubbed a queen so that the viewers could draw parallels between the Borg and a Bee Hive.
There is no in-universe answer There is speculation that she has a gender i.e is dubbed a queen, to draw parallels between the Borg and Bee coloneys.