It's the easiest computer programme to write! Sort all the teams from each level in % order group top to bottom. Put the top 14 in the league1, the next 14 in league 2 and keep going until you reach the bottom!
That way every team is in a league with teams of very similar %.
Why put big buyers in with smaller teams?