Medium allows you to set a canonical tag, so authors can direct SEO juice towards their own websites. Github/gist doesn't have that.
In practice 99% of what you read on Medium is syndicated, they are in the business of trading an audience for content (that in turn will grow their audience).