Yes, and if you look up the rules of war you will see that if you base your operations there the enemy is allowed to attack it. Besides a desire to not kill your civilian population that's another reason countries don't do that. But Hamas doesn't care for civilians.