Although this question would be best answered by the devs themselves, I'll offer my observation.
The main decision seems to be the Alliance factor. In a game I just finished, the Altarians after being whupped up by the Yors, decided to surrender their (quite sizable) territory to my Krynn nation. They were allied with me, but not allied with others. Even though I was actually in a quasi-battle for influence with the Altarians.
The second main factor seems to be the Good/Evil alignment. In the same game I had just finished (see above), my Krynn (Neutral) had an alliance with Korath (Evil). When Korath surrendered (due to badly-going war against Drath), they chose to bequeath their leftover planets to their other ally, the Yor Collective (Evil).
Side note: It goes without saying that I leveraged this factor extensively: having been dragged into war with Yor by my ally the Altarians (which then proceeded to bow out of the galaxy leaving me with the loose ends), I can then pluck the (previously) Korath planets without having to break a treaty. :-)