If it's new to you, you may also think that those groups came out of nowhere to do evil.
They did do evil. But they did not appear unprompted. See, for instance, https://cunninghamjeff.medium.com/the-long-shadow-over-palestine-the-terrorist-legacy-of-haj-amin-al-husseini-dab90552109b. It's good to read the history of the area in some depth. It's quite the mess, with plenty of malign actions to go around.
Also, the violence isn't sufficiently discriminate, but you can't call Gaza an "unarmed population". Hamas is well-armed, and they're mixed into the population. Ergo, it's a dangerously but not fully armed population. If it wasn't so dangerous, the IDF would use fewer airstrikes and kill way fewer people. This doesn't mean all the airstrikes are justified, but if you think the population is "unarmed", you can't even understand what's happening.