I think this is a good point, and also part of the larger trend of Internet activity moving to centralized providers. Users are now habituated to look for an existing platform to host their content, whether that's video (YouTube/Tiktok), blog posts (Medium/Substack), hot takes (X/Threads) or code (Github). It doesn't even occur to most people that there's another way to do it. They see these companies as just part of the public infrastructure of the Internet.
Because it’s so damn easy. I started contributing to OSS and creating repos on GitHub when I was 16. I was not able (or interested in) managing my own git server; I didn’t have any connections to Apache.org. Sure I could’ve emailed diffs to some mailing list, as I know many people have done for years, but GH is a vastly better experience.
Github was so accessible that it made possible what otherwise would not have been.