Also, the vast majority of developers don't have open source contributions or projects worth pointing to. Further, it strikes me that the ones that do have such projects can be much more selective about which company they work for than companies can be about them.
Furthermore you're making an assumption that anyone who has code on their github produced it for no compensation, as if that was their sole motivation.
Maybe it was a previous project, maybe they open sourced a side project that at one point made income, or maybe it was something they did as an experiment or for purely personal reasons and compensation had zero relevant bearing.
If you were at five places for 9-18 months at a time with several six month gaps interspersed? Not evidence of absence, but that’s absence of evidence to me. (Immediately, I’m assuming several of those gaps might be flameouts.)
I'm curious, what about this situation but no gaps?
None of these are signals that I rely on as binary go/no-go gates; the main point was “just because you got other employers to pay you for a short while, that’s not standalone evidence that you can deliver business value through working software”.
I don’t believe in jobs-for-life, “putting in your time”, “paying your dues”, “never quit before 2 years”, or other nonsense advice, but if you’ve never had a long stint at a place, at minimum you’ve never seen the pain from your decisions 24 months prior play out and the maximum negative case is far worse.
For most of the folks I've worked with, it's the case that if they take a job and they're not learning something, they're not going to stay long. And if they take a job and the choices are "stay here, even if they enjoy it" and "take a 15% compensation bump that will ripple through the rest of their career", it would be foolish not to go for the latter.
The places that understand that retaining people takes effort are less rare than they used to be, but they don't grow on trees. If you want to hire someone longer term, I hope you're putting the money, and the investment in that worker, on the table.
To be clear, I'm talking about a persistent pattern. Even those of us with fairly long-term employment (~10 year stints) in general often have one or two short stints for various reasons. E.g. dot-bomb in my case although the job wasn't a great fit anyway.
Now I get some people don't have time for open-source after work but it's way way easier to ace an interview when it can be based on something you build yourself, can show and can talk about the ins, the outs and the design constraints and your architecture choices.