I'm certainly no expert on Israeli / Palestinian affairs and am not taking sides, but it seems to me that had a "two state solution" been found a long time ago, the attack on Saturday would have been avoided.
On the surface, it's quite simple. Hardliners claim most of the land and don't want to share it with their neighbors. Not only that, each of the adversaries claim they have "god on their side", which is a no-win situation. "God is good!", each side shouts as they shoot at the other.
Palestinians in Gaza describe their environment as an open air prison where suffering is the norm.
Meanwhile Israel keeps building homes and developments in disputed areas, making it even more difficult to carve out a separate state.
All the while the rage becomes more fierce on the other side of the wall, and with no hope for the future, the result was inevitable.
At this point, going to be with their god is now the most appealing.