I know I can program. You don't know I can program. Do you want to hire someone who simply can't write a line of code to save their life and then have to deal with the headache of firing them and hiring someone else?
And that's best case scenario, because someone who can't code can do a lot less damage than someone who can code badly.
False negatives suck for the employee because they don't get a job. False positives suck for the employer because it's a massive headache and money sink. Since employers are the gatekeepers, they're often going to try to minimize false positives, even at the cost of false negatives.
And it should be asked, why is spending hours and hours building open source software outside of your day job a reasonable requirement? Doing open source well is incredibly difficult and requires a different skill set than working as a developer.
If you want to sit in front of a computer for several hours, then go home and do it all over again for free for the community, that's great. Sincere thanks are in order for that. But requiring it from all your candidates is unreasonable IMO.
Find some lawyer friends, ask them about the bar exam.
Find some doctor friends, ask them about what it took to become a full doctor.
Etc.
Software Engineers don't have those hoops to jump through. Anyone can call themselves a software engineer (in the US at least, other countries have legal requirements around the title). As a result it's up to the employer to do the weeding out of people who are no good.
Is it fair? Not at all. Is it always necessary? Def not. Does it make sense when software runs the world? Yes.
Ask employers and they'll tell you that over 50% of software engineer applicants can't even write a for loop. We're not talking "serious coding" here, we're talking "count to 5".
I'd say the two are related.
I simply refuse to do these anymore, which has unfortunately precluded me from FAANG level jobs. They give me panic attacks. It took over a year of searching in SV for me to find my current job because of it. Why is this the only industry in existence with such an accepted process?