Ender eventually figured out that the Formics - **intentionally** - pulled all of their queens (aside from the designated successor on what would become Sheakspeare colony) to their home planet. Basically, they committed "[suicide by Ender][1]".

I don't recall any mention of IF knowing this at all. They just wanted to wipe out as many Buggers as they could (if you defeat the star fleet defending a colony, you can then take over, the fact that the Buggers all died when their Queens did was just a cherry on the cake).

---

**UPDATE**: Here are the quotes:

***Enter in Exile***, Chapter 2:

> *(explaining what Ender was thinking about during Graff's trial)* It made no sense, what the formics had done. They weren't stupid. Yet they had made the strategic mistake of grouping all their queens—not "their" queens, they were the queens, the queens were the formics—they had all gathered on their home planet, where Ender's use of the M.D. Device could—and did—destroy them utterly, all at once.

> Mazer had explained that the hive queens must have gathered on their home planet years before they could have known that the human fleet had the M.D. Device. They knew—from the way Mazer had defeated their main expedition to Earth's star system—that their greatest weakness was that if you found the hive queen and killed her, you had killed the whole army. So they withdrew from all their forward positions, put the hive queens together on their home world, and then protected that world with everything they had.

> Yes, yes, Ender understood that.

> But Ender had used the M.D. Device early on in the invasion of the formic worlds, to destroy a formation of ships. The hive queens had instantly understood the capabilities of the weapon and never allowed their ships to get close enough together for the M.D. Device to be able to set up a self-sustaining reaction.

> So: Once they knew that the weapon existed, and that humans were willing to use it, why did they stay on that single planet? They must have known that the human fleet was coming. As Ender won battle after battle, they must have known that the possibility of their defeat existed. It would have been easy for them to get onto starships and disperse from their home planet. Before that last battle began, they could all have been out of range of the M.D. Device.

and, most importantly, his main realization:

> So in his mind he now asked the hive queens, over and over, though he knew they were dead and could not answer: Why?

> **Why did you decide to let me kill you?**

He elaborated on that later, when Petra came to talk to him:

> "I keep asking them, 'Why did you die?' "

> Petra searched his face for . . . what, a sign that he was joking? "Ender, they died because we—"

> **"Why were they still on that planet? Why weren't they in ships, speeding away? They chose to stay, knowing we had that weapon, knowing what it did and how it worked, they stayed for the battle, they waited for us to come."**

> "They fought us as hard as they could. They didn't want to die, Ender. They didn't commit suicide by human soldier."

> "They knew we had beaten them time after time. They had to think it was at least a possibility that it would happen again. And they stayed."

> "So they stayed."

> "It's not like they had to prove their loyalty or courage to the footsoldiers. The workers and soldiers were like their own body parts. That would be like saying, 'I have to do this because I want my hands to know how brave I am.' "

and finally, once Petra left:

> I can't believe you gave up, Ender said silently to the picture. I can't believe that a whole species lost its will to live. Why did you let me kill you?

  [1]: http://en.wikipedia.org/wiki/Suicide_by_cop