Artists maintain a portfolio of their work; why shouldn't programmers?
Sometimes it's best to evaluate the work rather than what goes into it. Granted, this isn't always the case and can't be attributed to multi team environments, but I've often been asked for code when I have a large number of (successful) projects solely developed by me.
Also, small code samples are fine but some employers are in the habit of asking for major work (demos) just to show off your coding chops. That's bad.
For a developer, the how matters as much, or even more so than the result. You could create a complete mess that still manages to just about work, and it wouldn't be obvious from a cursory execution of the binary just how bad it was.
Ideally, if I was going to hire someone, I'd want to know how they develop a reasonably-sized project. An interview or puzzle can give me some idea, but a GitHub account is far superior because it would show me how they work over a longer time frame, and perhaps with other people. I honestly can't think of anything that comes close to demonstrating skill.
So the fact that you can actually see more for a programmer is actually a bonus, but that doesn't mean it should be abused like plenty of companies try and do these days.
Risk aversion is fine, and obviously you want to hire the best candidate but like mentioned elsewhere on this thread:
1. Not everyone has public github projects and I hardly believe anyone should have to work on open source stuff just to show off their coding skills.. Thats really not the right reason to work on open source stuff.
2. For web projects while you might not have access to backend code you can always look at the front end and see if the guy is any good. This is especially true for me considering the fact that I have multiple projects developed from start to finish live and available on the Internet.
Again, small demos or code sample requests are always fine. However, an entire project to get a job somewhere ? Might have been okay when I had nothing to show for it, but after a bit of experience on your resume, it gets old..
The Github filter is a bad one, though - lots of good programmers don't do the whole open source thing, and we need to stop this pretense of a good Github account being necessary for hiring. What started as a suggestion in some hiring blog posts has become overblown into dogma now.