There is no justifying it. It was abhorrent.
Understanding how it has come to this is not a justification.
When guns are picked up barbarism follows. It's the lack of choice to armed struggle. Only very very few ideologues will choose that path if there is an alternative. What is the alternative for Palestine, existing as second class humans indefinitely?
The suffering of Palestinians is constant, not just a constant threat, but constant. They are oppressed, humiliated, maimed, intimidated, arrested and shot, and it doesn't make the news, because it's not news.
And it's not religion alone, it never is. If it was religion alone, Israel wouldn't and couldn't exist. It's about compromise and co existence. If these things were religion alone there would be no peace anywhere.