In 1998, Marvel was a comic book company trying to recover from a recent bankruptcy. So when Sony Pictures came looking to acquire the movie rights to Spider-Man, Marvel tried to cut a deal, according to the Wall Street Journal. Sony could have the right to almost every Marvel character for $25 million. When the offer reached a Sony higher up, the prospect of making a movie about Iron Man, Ant-Man, Black Panther or Thor clearly wasn't very enticing...
Sony ended up dropping $10 million on Spidey, but for $15 million more they could have had the rights to the rest of the Avengers and a whole bunch more. Eventually, Marvel started producing its own super hero movies. To date, the Marvel Cinematic Universe has grossed over $20 billion worldwide.