I do understand (and sympathize) why many job candidates disagree with the importance of a "personal portfolio" and so we get repeated frustrations of comparing it to accountants, lawyers, pharmacists, etc. E.g. if pharmacists don't dispense drugs on the weekend "for personal fun", why do we "expect" programmers to do the same?
The way to make better sense of it is to not frame it in terms of "expectation" of a job seeker but of "identification and preference" of employers choosing one job seeker over another. Whether the preference itself is flawed is irrelevant. The point is that it's human nature to use a preference as a tie breaker.
Programming, much more so than accounting/law, is an activity that many more people like to do for personal "fun". Because of this, it's inevitable that some employers tend to want to identify them and prioritize them over others.
And hiring preferences are not unique to computer programmers. Here's engineer Ben Krasnow (of popular channel Applied Science) explaining how a "personal portfolio" helps him stand out and get good jobs:
- deep link and watch for ~30 seconds: https://youtu.be/ihbYtxaEDSk?t=248
So, if you're an electrical engineer getting angry at the world because employers shouldn't "expect" you to design circuits for fun on the weekend, don't be surprised if they hire Ben instead of you.
Edit to add another Ben K video covering the same topic but mentioning Valve & GoogleX and choosing between prospective candidates:
- deep link: https://youtu.be/4RuT2TlhbU8?t=112