All Kyle had to do to not have any of that happen is not show up. The odds of that dramatically increased when he decided to show up with a gun where he knew a bunch of people, some of whom would would be armed, would be out in force and opposing his views.
Much like a lone women wandering late at night through a crime-ridden part of town getting raped, he may not have done anything wrong, but his bad judgement led to the expected consequences. And before we talk about defending his workplace, there's a reason many places say to not try to stop robberies - the insurance claim is far cheaper than the cost of most outcomes of trying to stop the thefts, even the relatively positive outcomes.
I agree that removing Hamas would make it far easier for there to be a peaceful solution. Unfortunately, Israel and Netanyahu took that option off the table a long time ago. If they don't like that they should have thought about the consequences of their actions. The PLA was willing to negotiate and that didn't work for them. Hamas is far less willing to peacefully negotiate, which gave Israel a handy whipping boy for not resolving this peacefully. Now people are dying and they claim to be the wronged party, when in fact both parties have wronged each other for hundreds or thousands of years.
If you sow the wind, you reap the whirlwind. Unfortunate that it's messy for everyone around them.