Thing number one is preventing their own citizens from communicating and organizing among themselves. Thing number two is the international soft-power push, mostly aimed at muddying the waters of public discourse enough that they are no longer the unquestionable bad guy (the goal here is simply to damp down international criticism). Preventing the spread of "Western democratic values" and "universal human rights" in China is a concern, but probably doesn't make third place, or even fourth.
But blocking GitHub has proven to be very costly so they're often forced to revert the decision. That's why GitHub appear to be the perfect place to host and promote truthful content (e.g. wiki articles about tiananmen massacre, xijiang concentration camps, etc) along with detailed instructions to bypass censorship. Right now it appear that at best China can prevent a specific URL from being shared on weixin/weibo/etc but can't stop people from opening the repo if they find a creative way to share it after (e.g. put the link in an image and modify the image slightly to change its hash before sharing it).