With “Black Panther,” Marvel Studios is poised to celebrate not just another box office hit but its 10th anniversary as the most successful and influential movie studio around. Where to find the origin story of its string of blockbusters? In a decision made 20 years ago by another studio—in what was quite possibly the biggest mistake in Hollywood history.

In 1998, a young Sony Pictures executive named Yair Landau was tasked with securing the theatrical screen rights to Spider-Man. His company had DVD rights to the web slinger but needed the rest in order to make a movie.

Marvel Entertainment, then only a famed name in the comic-book world, had just begun trying to make film deals. The company was fresh out of bankruptcy and desperate for cash, so its new chief, Ike Perlmutter, responded with a more audacious offer. Sony, he countered, could have the movie rights to nearly every Marvel character—Iron Man, Thor, Ant-Man, Black Panther and more—for $25 million.

Mr. Landau took the offer back to his bosses at Sony, whose response was quick and decisive, he recalled in an interview: “Nobody gives a shit about any of the other Marvel characters. Go back and do a deal for only Spider-Man.”

Nothing is easier in Hollywood than predicting hits in hindsight. Sony, which declined to comment on the deal, wasn’t the only studio that missed an opportunity to buy Marvel, or the rights to its characters, for a fraction of the $4 billion that Disney paid in 2010. And there’s no way to know if Sony would have been as successful with those characters as Marvel has been.