I don't see how those two points are related. A measure can be good or bad independent of who you choose to measure by it.
Github(not necessarily just having an account but actually looking at what they have done) is a good measure of skill because it allows you to see the person's work output. You know exactly what they contributed to a project and what type of work they are interested in and are familiar with.
Now just because it is a good measurement of skill doesn't mean that it is a good hiring filter. The two are similar but not the same thing. A good hiring filter filters for skill but doesn't filter for other attributes like race and gender. It is kind of like saying measuring how much weight a person can lift is a bad measure for determining a person's strength because we only measured white guys. It is a good measure of strength, just misapplied if you are trying to find the world's strongest person.