How the league system works has also been explained in a past "Live Q&A Video", but I am happy to write it here as well.
Basically every guild has a value assigned, called "Match-Making Rating" (MMR).
This value decides on the league allocation!
When Battlegrounds started, every guild was assigned a specific MMR value, according to amount of members and recent activity in Guild Expeditions and GvG (this was the best approximation we had available at that time).
So it was totally possible that two guilds were starting off in Gold league, but one had a weak MMR value, and the other one was strong. The guild with the strong MMR was therefore way closer to ranking up to platinum.
That's why it may even happen that a guild that is placed 2nd gets promoted (because it was at the brink of ranking up anyway), and guild that places 1st will not climb in league (as the MMR was weak to begin with).
However, this case should be rare because ...
... matchmaking of guilds for each battleground happens first and foremost using the MMR value. Therefore we can make sure to match guilds that are very close in terms of MMR.
Imagine there are 10 guilds in gold, then we end up with two battlegrounds: One has the 5 guilds with the highest MMR within gold league, and the other instance has 5 guilds with the lowest MMR within gold league.
In the long run this will make up for a more granular and therefore more fair competition.
This may also hint at how we calculate the prestige gains from battlegrounds & leagues.
We use the MMR to provide prestige, so that not every diamond guild ends up with exactly the same amount of prestige.