It was late at night in an NBA hospitality suite in an L.A. hotel. It was during one of those Celtics-Lakers championship series in the mid-1980s when the league was really taking off. You knew that because odd, interesting people were turning up around the bar. I believe that night’s special celebrity guest was Stephen Stills, who was accompanied by the great session keyboardist Mike Finnigan. Even a roomful of half-lit sportswriters can be classed by the presence of a guy listed on the Electric Ladyland liner notes, a credit for which a lot of musicians would sell their white-haired grandmothers to Somali pirates.

Anyway, long about midnight, commissioner David Stern came down, grabbed a beer, sat down on the couch, and gabbed with whoever wandered by — and there was a lot of wandering going on at this point in the evening. Someone — I don’t recall who, but I suspect it was a member of the NBA’s PR crew — ordered up a whole raft of those single-serving pizzas for which America’s finer chain hotels regularly overcharge the guests who need a snack at two in the morning. At which point, someone winged one of the pizzas across the room, over the commissioner’s head, and smack into the wall above him. Someone else then put a hat on the bar, and thus was declared open the first (and, as far as I know, only) “Hit the Commissioner With a Pizza for a Buck” contest. If you put a dollar in the hat — all the money went to charity — you could scale one of the pizzas at the league’s boss, as long as you didn’t hit him, because the someones involved all liked and wanted to keep their jobs. A respectable fusillade erupted. Stern sat there with remarkable aplomb as cheese and tomato shrapnel exploded over his head until he finally stood up. “The hell with this,” he said, and left the room to raucous applause.

And, anyway, that’s the first time I ever saw David Stern, who already had turned the NBA into something that attracted the random rock-and-roll star and was on his way to turning it into so much more, for good and for ill. So much was still in the future. Michael Jordan was just coming into his own after spending his formative NBA years on a team where the second-best player was Orlando Woolridge. Yao Ming was merely a tall kid in China. LeBron James was about 3 years old and probably had received only 15 recruiting letters. Oklahoma City was a gas station. The All-Star Game was only then becoming a Weekend. Seven years later, for reasons too complicated to explain here, I was in Qatar, covering the Asian Zone qualifying round for the World Cup. This was old Qatar, before we turned it into an aircraft carrier. I wandered into a sporting goods souk, looking to buy a jersey or two from one of the competing teams. (And what a field it was: Saudi Arabia, Japan, North and South Korea, Iran, and Iraq. Traditional rivals!)

Anyway, the nice Qatari man behind the counter was very sad. No, he told me, we have nothing like that. But then his face brightened. Hey, I was American! He reached behind the counter. “Look,” he said. “We have Michael Jordan!”

That’s what the NBA became while David Stern was its commissioner. It became the giant, gleaming, diamond-tipped drill bit of market penetration.

Now, as Stern leaves after 30 years on the job, there is a natural tendency to treat him as though he were some complicated hybrid of Henry Ford, Don Draper, and Rick Rubin: the man who invented and sold an entirely new product that crossed national and cultural barriers to mainstream a new kind of sports-entertainment complex wah-dee-doo-dah. Much of that is true, but it’s only half the story. For one thing, the narrative leaves out (and indeed, positively minimizes) the efforts of Larry O’Brien and Larry Fleisher — two men who really arranged that David Stern would still have an NBA to market. So we will begin there, with O’Brien and Fleisher, two guys at whom nobody ever threw pizzas, because, when they set to work, nobody cared enough about the NBA to try.

♦♦♦

In 1980, the NBA was something between a cult object and a burlesque act. Those of us who still followed the league did so with bags over our heads to hide our rueful grins. (Let it be said. I loved those late-1970s Seattle teams, and it was fun to watch Julius Erving come into the league and blow everybody’s mind.) The argument that the NBA was “too black” to market itself was seriously made by serious people in an age when an organized backlash against the achievements of the civil rights movement was asserting itself, as we saw in the courtroom and in coded language. The argument that the NBA was a “drug league” — which was really a variation on the former contention — was seriously made by serious people in an age when the “war” on drugs was gathering itself. More to the point, and partly because of these problems, the league was broke and floundering, its championship series famously being played on tape delay.

The commissioner at the time was Larry O’Brien and, in the rush to canonize David Stern, there has been an unfortunate tendency to treat O’Brien as though he were kind of an amiable lightweight in a job that was too big for him. This is, of course, nonsense. O’Brien was a deep-game player his entire life, a crucial member of John Kennedy’s New Frontier brain trust, and he helped wrangle the 1964 Civil Rights Act through Congress on behalf of Lyndon Johnson. Hell, in June of 1972, it was Larry O’Brien’s phone that Howard Hunt sent his burglars back into the Watergate office complex to tap. If O’Brien hadn’t been sharp, he wouldn’t have signed up as his executive vice-president in 1980 a shark of a New York lawyer named David Stern.

The director of the National Basketball Players Association at the time was Larry Fleisher, and 30 years ago he did a remarkable thing. He managed to get the NBA to show its players’ union the real books — which terrified everyone — and then he sold his union on the notion that cooperation with management was the only way to guarantee players would have a job in five years. And this was in an era in which football’s union was bargaining away any chance at real free agency, and baseball’s labor-management paradigm had begun to develop the resemblance to Game of Thrones that persists to this day. Working with Stern, but under the aegis of O’Brien, Fleisher helped develop and sold to his membership a salary cap, which was unheard of at the time. Stern did a marvelous job growing the league, but there were many hands involved in saving it, and we haven’t even mentioned Larry Bird and Magic Johnson, who came along at exactly the right time, and who helped turn Stern into a genius.

♦♦♦

So, handed a remarkable turn of fortune that he helped engineer, what did David Stern do? Well, he grew the brand, as the marketing people say, and he grew it astonishingly well. The value of the franchises has increased tenfold. There are four television networks broadcasting NBA games worldwide. He has managed to stay ahead of the curve technologically, moving the league into the digital age more smoothly than was the case with many other American industries. The players make gobs of money. David Stern’s work here is done.

However, it has come at a price. By marrying the NBA to its “corporate partners,” and by doing it so thoroughly and so well, Stern has cost the league much of its soul, in the fullest meaning of the word. Both the 1998 and the 2011 lockouts were stupid and unnecessary and seemed more than a little like they were more about control and the authority of Stern’s office than they were about money or anything else. (In 2011, Stern gave preposterous interviews in which, channeling his inner Bud Selig, he maintained that 22 NBA teams were losing money, which, I guarantee you, was not something he was telling his corporate partners, or his good friends over in China. This wasn’t Larry O’Brien and Larry Fleisher operating in rare good faith.) He presided over — and indeed, celebrated — the unconscionable hijacking of a franchise from one of the NBA’s most loyal fan bases in Seattle because the city wouldn’t give in to ensemble blackmail and build the team a new arena. The specter of the days when the NBA was thought to be “too black” never has been far from his decision to knuckle Allen Iverson about rap music and to create and enforce a silly dress code that was applauded by great swaths of the nation’s boring people, and to make a buck off the softer side of hip-hop culture while remaining terrified of its tougher precincts.

There is an essential cowardice in all authoritarians, which becomes more obvious as they tighten their grip. In the long view, it’s hard not to come to the conclusion that the more the NBA prospered, and the more tightly it bound itself to the corporate money that swarmed on that success like bugs on honey, the more nervous it got about how wealthy it had become. The more luxurious the palace, the deeper the moat. And David Stern’s primary job over the past two decades has been to dig the moat. He has been the vehicle of the deep insecurity that has come with the NBA’s headlong success.

He has made the league gleam, but he has sanded off its edges, and let that be his legacy. He made a product that people will buy. He has sold the NBA in Qatar, and the guy behind the counter was happy, and so there’s that, and nobody throws pizzas at David Stern anymore, just roses by the handful.