Best I can make out, HAMAS won the 2006 Parliamentary elections pretty much in the way Trump won the 2016 election. It got the most votes in a fair election, because the people were fed up with the feckless alternative. HAMAS then set about taking over by force.
But even if you are right that HAMAS imposed itself on an oppressed population, no state attacked by an enemy power has any obligation to protect that power's civilians who are used as human shields.