This is just analyst opinions. The New Yorker actually interviewed a Hamas leader and got them on the record. He claimed that Israel left them no choice; non violent protests had failed and asking the UN for help failed, and moderate voices were ignored by Israel, meaning only violence was left.