This is true, and the "Palestinians elected Hamas" narrative is obviously hamfisted. But that also provides cover for denying the uncomfortable reality of Hamas' empowerment, proliferation, and fusion within Gazan society. "Palestinians do not equal Hamas" is objectively true, but its also not like Hamas is some foreign occupying force ruling in spite of Gaza Palestinian resistance. At best, Hamas has flourished in a Gazan environment that lacks sufficient centralized governance to keep them down. At worst, they rule with implicit consent of the Gazan population.
Or, as has been repeated over and over throughout history, a political/power vacuum and bungling by geopolitical heavyweights allowed bad actors to seize control over a largely oppressed and impoverished population, which - even if it wanted to - lacks the means to depose their rulers.
The problem in Gaza isn't that it "lacks sufficient centralized governance to keep (Hamas) down." The problem is that Hamas
is the centralized government.
Honest question for the "Gazans = Hamas" crowd ... what can/should average Gazan citizens - most of whom are just squeaking by to survive and provide - do to wrest power away from Hamas?
Hamas controls all the money, institutions and guns, and hasn't allowed an election since 2006. What are the options for the local schoolteacher or nurse or shop owner?