Fighting the Jews and Christians is legislated because They are Idolators and Disbelievers
Allah tells;
وقالت اليهود عزير ابن الله وقالت النصارى المسيح ابن الله
And the Jews say: "Uzayr (Ezra) is the son of Allah,''
and the Christians say: "The Messiah is the son of Allah.''
Allah the Exalted encourages the believers to fight the polytheists, disbelieving Jews and Christians, who uttered this terrible statement and utter lies against Allah, the Exalted.
As for the Jews, they claimed that `Uzayr was the son of God, Allah is free of what they attribute to Him. As for the misguidance of Christians over `Isa, it is obvious. This is why Allah declared both groups to be liars,
ذلك قولهم بٲفواههم
That is their saying with their mouths,
but they have no proof that supports their claim, other than lies and fabrications,
يضاهوون
resembling, (imitating),
قول الذين كفروا من قبل
the saying of those who disbelieved aforetime.
They imitate the previous nations who fell into misguidance just as Jews and Christians did,
قاتلهم الله
may Allah fight them,
Ibn Abbas said,
"May Allah curse them.''
أنى يوفكون
how they are deluded away from the truth!
how they deviate from truth, when it is apparent, exchanging it for misguidance.
Allah said next,