People do not robotically obey every single edict of their sacred texts. If they did, the world would be full of Christians who love their enemies and turn the other cheek when attacked. There are political reasons why a tiny minority of Muslims are turning to terrorism, which have nothing to do with Islam.
Do unto others as you would have them do unto you.
All else is simply commentary.