Why was Sourceforge so tough to displace, aside from no one having the will to do it?
Craigslist controls a two-sided market. If I build a new site, I can't get buyers without there already being sellers. And vice-versa. That's an incredibly difficult business problem.
Github seems to have had it easier. I can just host my new project on github and be done with it (my website links to it after all). I'm sure sourceforge had some value just by being the go-to place, but how strong was the network effect from a developer perspective?
To deconstruct the SourceForge decline, which felt as painfully slow as the glacially slow erosion of IE 6 market share, it's important to recognize it in context.
SourceForge and its related properties were the backbone of the early web, supporting a number of important efforts to which people felt a strong allegiance. It was like a benevolent force at the time.
SourceForge had, at the time, a fairly formal process for registration. They considered themselves more like a library where getting shelf space was a privilege not doled out lightly. This is not unlike how getting into the Yahoo! directory required a lot of begging and pleading.
While this meant that most of the projects hosted by it had a lot of merit, those lesser efforts were left out in the cold. They failed to switch to a more casual model as the "Web 2.0" philosophy started being the dominant mind-set, where expectations shifted dramatically from carefully curated content to emergent user-driven communities.
Also worth noting, GitHub's pace of innovation is so far beyond nearly anything else in the industry that it was only a matter of time before they became the superior platform in terms of technology.
Additionally they were able to ride the surge of popularity that git was gaining, something that SourceForge didn't support at the time, and persuaded a number of high-profile projects to move to them. The real coup was Ruby on Rails, which once hosted there, solidified their position.
Any Craiglist displacer would need to swing a few important, strategic deals to cement it in the minds of people as a reasonable alternative. The rest would be a case of just driving harder than Craiglist is willing to keep up with.
It's a difficult nut to crack. Kajiji seems to be gaining some traction, but it's trading one set of UX nightmares for another.