The coding questions are not literally "Can they physically write code or not?" They're evaluating your problem solving skills and coding skills.
There is some inconsistency though with someone's performance in coding questions. Someone usually won't bomb one and then do great in another (although they might feel as though they did). But someone might do mediocre and then do pretty well on the others. Asking multiple questions is just getting multiple data points.