The problem is that everyone says this but then nobody defines 'grey'.
It's been a while since I've done UX but I remember a couple of rules of thumb involving projectors (if you work on project management tools it is a certainty that your tool will be used in anger on a projector, and shitty UI in an emotionally charged room is a toxic cocktail).
Anything greater than #eee is indistinguishable from white, and anything less than #222 is indistinguishable from black.
In the days before font weights actually worked, you could do three font weights by mixing #222, #444, and bold.
So that's a third of the greyscale range that isn't grey, at least, and it also misses other mostly-grey colors, and a bunch of shades of blue. Which I think is a long way of saying it's not grey that's the problem, it's low-contrast that's the problem. While grey is heavily represented in that set of colors, it's not all of them, and it might not even be half of them.
I think this is a bug. I'm pretty sure the calculations are meant to flip from black to white in an instant. But the tools provided make that very difficult.
Honestly surprised GitHub did this.
I've worked with software where a user picks a color for something that renders text atop it. Never once did I think to allow for an in-between color.