Hamas sees israel taking Palestinians hostage and has figured out the only way to get their hostages back is take israeli hostages and trade them.
Hamas sees israel breaking these international laws all the time and just mirror it because people are fine with it when israel does it. At least Hamas is not targeting kids like israel.
Hamas certainly did war crimes but the worst ones are either heavily exaggerated or made up (40 beheaded babies in ovens). And that’s the stuff people keep repeating. It only serves to demonize Palestinians to keep israel’s Genocide going.