But this is to fulfil what is written in their Law: ‘They hated me without reason.’

“But” is somewhat unexpected. Jesus is probably indicating that the conduct of the Jews was the opposite of what it should have been.

“in their law” =  (8:17; 10:34). Hoskyns thinks that Jesus states it this way “to rivet upon the Jews those scriptures in which they boast themselves so proudly, and then to prove those same scriptures prophetic of their apostasy.”

John 8:17  In your own Law it is written that the testimony of two men is valid.

John 10:34  Jesus answered them, “Is it not written in your Law, ‘I have said you are gods’?

“They hated me without reason” is referring to either or both of these: (Psalms 69:4, 35:19). There really is no good reason for the rejection of Jesus by man.

Psalms 69:4  Those who hate me without reason outnumber the hairs of my head; many are my enemies without cause, those who seek to destroy me. I am forced to restore what I did not steal.

Psalms 35:19  Let not those gloat over me who are my enemies without cause; let not those who hate me without reason maliciously wink the eye.