On multiple occasions the Jewish leaders sought to have Jesus killed for blasphemy (additional thoughts in my posts here & here), and it was on the basis of blasphemy that the Sanhedrin would declare Him guilty and deserving of death later (see Matthew 26:65-66).
It is straightforward to read the question earlier in the chapter (see John 8:25) Who art thou? as a trap, as were other questions asked of Him at other times (taxes for Caesar anyone?). The religious leaders may have been trying to solicit from Jesus a plain statement that they could use against Him, much as the High Priest indeed did later at Jesus’s trial:
- If Jesus explicitly acknowledged Messiahship, the Sanhedrin could
have Him arrested as a threat to Rome, since the prevailing belief at
the time was that the Messiah would overthrow Roman rule.
- If Jesus explicitly acknowledged Divinity, the Sanhedrin could have
Him charged with blasphemy.
Treason
The perceived risk to Roman sovereignty was without cause, as Jesus Himself acknowledged before Pilate:
Jesus answered, My kingdom is not of this world: if my kingdom were of
this world, then would my servants fight, that I should not be
delivered to the Jews: but now is my kingdom not from hence (John
18:36)
Blasphemy
The irony in the blasphemy charge is pointed out by Talmage:
There could be no crime in the claim of Messiahship or divine Sonship,
except that claim was false (Jesus the Christ p. 626)
If Jesus was not the Messiah or the Son of God, there was legal cause against Him. If Jesus was the Messiah & the Son of God, the hatred and attempted execution were without cause.
Jesus' claim in John 15:25 is true, provided we believe that He is the Messiah & the Son of God. The author explicitly acknowledges this belief in chapter 20:
But these are written, that ye might believe that Jesus is the Christ,
the Son of God; and that believing ye might have life through his
name (John 20:31).
Conclusion
Whether they tried to trap Jesus for treason or for blasphemy, their accusations were without cause.