When considering a roster that flaunts four NBA All-Stars, the first question is: In a league with a salary cap, how is that even possible? Part of the answer, according to Southern Utah University’s Dave Berri, a sports economist, is what’s called a max contract.

The player most frequently associated with the birth of NBA maximum contract is Kevin Garnett, who signed a six-year deal for $126 million with the Minnesota Timberwolves during the 1997-1998 season. At the time, he was 22 and it was the biggest contract in sports history. The following year, NBA owners revolted and staged a league lockout, one result of which was the creation of the max contract, a labyrinthine system whereby the salaries of star players would now be limited to a certain percentage of the team’s total salary cap. (The max-contract limitations vary each year, based on the size of the salary cap and the length of a player’s career.)

Being awarded something called a “max contract” sounds like a wonderful thing, but Berri says this was a win for teams and a loss for elite players: It imposed a ceiling on how much players could earn. (And for the record, Kevin Garnett, who has one NBA title and one MVP award, remains the highest career earner in NBA history.)

The salary cap exists to preserve parity in the league—it stops extremely wealthy owners from funnelling all the top talent to their teams like in baseball—but consequence of it is that it limits the earnings of some players who could be making a lot more money. It’s very easy to argue that LeBron James, for example, is worth far more than the $25 to $30 million he’ll make with the Cleveland Cavaliers next year, but the league’s collective bargaining agreement restricts him from making more. Without an earnings ceiling like that, the team would not have been able to surround him with a player like Kyrie Irving, who also makes the max, or Kevin Love, who signed a long-term contract worth $110 million last year.

So, the max contract was a long-term enabler of NBA superteams, but next season’s Warriors were also shaped by some very favorable coincidences. The Warriors were lucky in landing Durant and having the salary cap space to do so. Much of that came down to timing; two of their three stars, Klay Thompson and Draymond Green, aren’t signed to max contracts even though both certainly could command them. Then, there’s Steph Curry, who signed a relatively modest four-year contract extension in late 2012, shortly after suffering a series of ankle injuries; last year, Curry was the league’s first unanimous MVP in NBA history as well as the fifth-highest paid player on his own team.

Even more crucially, Kevin Durant’s free agency dovetailed with a historically unprecedented occasion—a $24-million increase in the league-wide salary cap, from $70 million to $94 million, because of an unexpectedly lucrative $24-billion television deal. That six teams could credibly court a maximum-contract player like Durant is only one wrinkle in a free-agency frenzy where unproven or second-tier players have been signed to huge contracts. Mike Conley, a guard for the Memphis Grizzlies, for example, will sign the highest-paying contract in league history, despite having never appeared in an All-Star Game.