If Hamas was an Israeli guerilla group demanding of Israel to strictly obey the Torah or else, I could perfectly understand why Israel should not talk to it.
But once you go to someone else's land and occupy it for over 40 years and confiscate land and transfer civilians on to it and the people who are resisting you were born and raised under that occupation their entire lives, then you have no excuse whatsoever to not talk to these people regardless of what they think of you or have done to you.
And if you make the issue the resistance you're getting to your occupation and refuse to recognize the rights of the people you're occupying then you deserve everything coming your way.