As someone who does a fair amount of hiring, I would never hire someone off the strength of their (supposed) work alone. The ability to problem solve under pressure and their ability to communicate effectively with others are really important factors I won't get from looking at their Github account.
I agree in situations where the candidates are the ones doing the outreach. However, what I'm saying is that I don't want to be recruited by a company unless they've actually heard of me before and think my work is on par with what they want. It's bullshit to me to be spammed by a company that claims you'd be great with their team, only to be dumped into the same candidate pool as 800 other applicants.