Hamas doesn't have an air force, and they're facing an enemy with a good air force and good intelligence. They can't have nice things like "zoning", if they stored rockets away from civilians they would all get destroyed.
So, in order to have rockets, they must be stored under targets that would cause political trouble if they were to be hit: hospitals, churches, mosques and schools.