Then he answers an objection. For someone could tell Christ that his doctrine was not from God because he broke the sabbath, according to, "This man is not from God, for he does not keep the sabbath" (below 9:16). This is what he intends to answer; and he does three things. First, he clears himself, by arguing from the actions of those who are accusing him; secondly, we see their vicious reply (v 20); and thirdly, he vindicates himself with a reasonable explanation (v 21).
He says: Even granting, as you say, that my doctrine is not from God because I do not keep the law, breaking the sabbath,... nevertheless, you do not have any reason to accuse me since you do the same thing. Thus he says: Did not Moses give you the law? i.e., did he not give it to your people? And yet none of you obey the law. "You received the law through the angels, and have not kept it" (Acts 7:53). This is why Peter says: "A yoke, which neither our fathers nor we were able to bear" (Acts 15:10). Therefore, if you do not keep the law, why do you want to kill me for not keeping it? You are not doing this because of the law, but out of hatred. If you were acting out of devotion for the law, you would keep it yourselves. "Let us lie in wait for the just man, because he is unfavorable to us, and against our works, and he reproaches us for breaking the law" (Wis 2:12); and a little further on we read: "Let us condemn him to a most shameful death" (Wis 2:20).
Or, it could be explained this way: You do not keep the law that Moses gave you; and this is obvious from the fact that you want to kill me, which is against the law: "You shall not kill" (Ex 20:13). Another explanation, following Augustine, is: You do not keep the law because I myself am included in the law: "If you believed Moses, you would perhaps believe me as well, for it was about me that he wrote" (above 5:46). But you want to kill me.
Source: Commentary on John