Wars generally don't end with genocide.
Conquered people don't cease to exist. Worst case they are subjugated, but these days they just assimilated/absorbed.
The alternative is perpetual war, or some sort of compromise.
If Hamas surrendered unconditionally tomorrow, what would Israel do?
I agree with you that this is not actually the nature of War. However, it's also true that it depends on the type of war being fought.
It's not uncommon to see in history that when a country/village/group of people can't/doesn't want to be subjugated or it's strategically difficult to "keep" them, it gets wiped off.
In the Ancient Rome entire Celtic tribes wiped off, while during Charlemagne's empire it was the Saxons, and more recently during the the Ottoman Empire it was the Greeks, Armenians, and today the Curds.
Unfortunately such things do happen and sadly enough will always happen. Not justifying in any way, I am just saying that we're so used to believe that this is something new, when it actually it isn't, and we also believe we are better than back then, while we actually aren't. :(