Having done hundreds of interviews, I'm sorry to say that even seemingly "senior-level" people (people with years of programming "experience" on their resume) have shown an inability to do basic coding from scratch. It seems there's a subset of developers who cobble stuff together and code-and-fix to make things work. This is ironically less of a problem with entry-level people.
Yes, if you have a public repo of code, I'll ask you about it, but I want to see you live code something, both to see the code you write and your thinking process about solving the problem. If you feel that's a waste of your time (and if you're truly senior-level, it really won't take very long at all), that's fine, but I will continue to do it.