It's all about context. While a candidate might have some code online, you save a lot of time by having some code that you're more familiar with and can utilize to see how they think about a problem.
Also it's good to see how someone reacts to digging around in an unfamiliar code base and see how they familiarize themselves.