Because PR is important for international support. There might not be any way to look "good," but you can try to avoid looking "bad."
Everyone knows Hamas is using the Palestinians as human shields, but that doesn't mean you should just say "F' it" and have the attitude that you're going to kill everyone in Hamas regardless of how many civilians get killed in the process.