There are some truths, some facts, that don't seem to get much airtime when tragedies like this occur and are discussed.
At their core, the countries these people originate from do not believe in the freedoms we take for granted in the west. Just the same as western countries not believing in the restricted freedoms under which said countries are governed.
Slowly, some of our freedoms are being eroded because of acts perpetrated by those from these countries. e.g. the need to have massive concrete blocks dotted here there and everywhere (e.g. these markets, London Bridge etc) to reduce the risk of one of them driving into whatever space. Anti terrorist measures.
Of course, the high majority of people living in the west (who originate from these countries) live in peace. That is also a truth, a fact. However that alone doesn't answer the question of how we resolve this.
I do think, and have always thought, when something happens that is counter to our beliefs and freedoms (e.g. the group that protested outside the theatre play that time leading to it closing) our authorities should come down heavy and quickly on these people, essentially saying 'no, back off.' The more we back down to seemingly small and insignificant things like this, the more we (perhaps unintentionally) erode our own beliefs and freedoms.
To use my earlier example, I would love to see the UK without concrete blocks and bollards here there everywhere. Somehow, I doubt that will ever happen.