First, I am guessing here, but I suspect you may not be familiar with git. It's a revision control system. It stores every state your code has ever been in. It allows you to go back in time to see code you've removed. But the biggest advantage of git is branching. You can make a branch and try out some code changes to see if they work and if they do, you can merge the code into your main branch.
Then comes GitHub. GitHub is basically a "social coding" platform. Since it's backed by git, all those experimental branches that you can create, others can create as well. They can copy ("fork") your project and make changes. And they can submit those changes to your repository as a "pull request" and you can review them and decide whether to accept ("pull/merge") those changes into your main branch.
To me, that's the biggest advantage. It allows people who have an interest in your project to contribute to its development.
There are tons of other advantages. Continuous integration, code review interfaces, tagging releases, issue tracking, etc. you just have to get used to the idea that it's open source. Anyone could copy your project and diverge (e.g. I forked an RC car controller interface and changed it to control my Bose stereo), so it's important to carefully select the license you want and include it in your repo (e.g. GPL 3.0). It dictates what people are allowed to do with your code.
One other advantage I just thought of... if a developer stops supporting their product and keeping it up to date, any one can jump in and carry the torch by forking the project and maintaining it.