Wa Alaikum As'salam dear brother Affan,
Our Prophet, peace be upon him, attacked them because they betrayed their covenant with the Muslims at the battle of trench, or also known as the battle of the alliances. They betrayed their covenant with the Muslims and joined the pagans against the Muslims. And after Allah Almighty sent a mighty desert twister that took out most of the infidels' water and food, and forced them to go back to their tribes, the traitors from the Jews and Christians were left alone. So the Prophet went in and took care of them.
The doomed-to-Hell infidels have nothing on Islam.
Take care,
Osama Abdallah