The bundling thing happened after Sourceforge was already well in decline, 2013, which was five years after GitHub launched. Google Code shutdown was announced 2015. IIRC Sourceforge was becoming less relevant because it hadn’t introduced git support, and GitHub answered that demand. By the time it added it, it was too late.
Bundling adware with software was not the death knell for Sourceforge, it was a death rattle - though the corpse is livelier than I’d have thought ten-plus years later.