Why did the Prophet Muhammad fight in battles? Did he raid their caravans? Isn't it wrong to fight or raid caravans?
People like Sumaiya and her husband Yasir (may Allah be pleased with them) were killed because they believed in Islam. Their son only escaped because he finally caved under torture to say whatever the Makkans wanted him to say (they wanted him to curse Muhammad). Of course, he is forgiven because he only did it when forced to. After that, the Prophet’s relatives were boycotted to the point of them starving for a year.
After that, the Makkans attempted an assasination of Muhammad (peace be upon him) the night he intended to leave Makkah. After the Muslims left Makkah in the hijrah (emigration), the Makkans rounded up the left behind properties and sold them in their caravans. This all happened, and the Muslims had done nothing except believe in the their religion and say “There is no God but Allah!”
This is the context in which the Prophet fought the battles. The Muslims raided their caravans, because they were profiting off of the property of the Muslims. The Muslims fought battles against them because of their oppression of people like Bilal who had the rock on his chest.
Islam does not let Muslims sit by when there is oppression because then there would be no justice. Allah commands that justice be done on Earth, and Muhammad (peace be upon him) did not fight except in justice. He never broke a treaty that another side upheld, and he never killed anyone except those who fought against him and helped in fighting against him.