Hamas took political control of Gaza
After 2005, Hamas took political control of Gaza and proceeded with a military buildup, aided by billions of dollars of worth of contributions from Islamic nations around the world, much of which was used to purchase weapons and military supplies.
In the years between 2005 when Palestinians were given control of Gaza and 2008, Hamas launched almost 4,000 rockets against Israel, resulting in numerous Israeli deaths. Israel struck back against launch sites, and military storage locations, many located in high density civilian areas, resulting in many Palestinian casualties.
Hamas apologists are quick to point out that Palestinian casualties greatly exceeded Israeli casualties, neglecting, of course, to point out that there would have been NO Palestinian casualties had Hamas not been launching rockets against Israel. Their claim is that Hamas would not have needed to launch rockets if Israel didn't exist, so it was all Israel's fault.
Since 2005, before many of today's Palestinian supporters were born, Hamas has launched over 20,000 rockets of increasing range and accuracy against Israel leading up to the October 7, 2023 attack. Israel throughout has shown incredible restraint in trying to destroy only military sites and resources, while causing minimal civilian casualties.
Meanwhile, Hamas has been manipulating world opinion by placing military facilities at schools, hospitals, apartments and other locations where a return strike would be guaranteed to result in large numbers of civilian casualties. This coldly cynical approach has paid off in international condemnation of Israel, neglecting the role of Hamas in causing such casualties.