The tunnels are built to provide strategic advantage over Israeli military superiority. Also to smuggle equipment for rockets which Hamas has plenty of and uses them regularly. Ordinary Gazans do not get to use the tunnels to hide and stay alive. They are needed as human shields instead.
Israel is far from being a spotless angel. Nothing in life is black and white like that. But Hamas started this one. And Israel cannot live with an organization that kidnaps, rapes and beheads people on its border