GitHub stars are a popularity contest that has little correlation with the quality of your work. You get them when lots of people happen to look at your GitHub profile, for one reason or another. I recently discovered this when a project of mine [1] that had been on GitHub for six months got starred by a prominent open source developer at my company. Within the next week, 50 random people came through and starred the same project. It's not my best code, it's not complicated, and I doubt most of those people ever tried it. Instead, they starred it because they're the kind of people who happen to star a lot of things, and they saw it from somewhere else.
I'm always happy to get a kudos on GitHub. But those of us who don't play the game of promoting our own code on social media, or who have code we can't post on GitHub, would be at a significant disadvantage in a hiring process based on that metric.
[1]: https://github.com/tdeck/teambot