The key is that GitHub understands open source. People who write open source aren't magical. We still need food and that means a j-o-b. You can have your public open source code and your private proprietary code right next to each other, in the same place. How brilliant is that?
Sourceforge was definitely created in an era when open source was much more project oriented (think, Samba, gnome, python, etc.) and back then it didn't make as much sense to have open source + closed source code side by side. But things have fundamentally shifted with regards to how open source software is created and sf.net definitely hasn't made the shift as smoothly as it should have.