That is not true.
That is a choice that can be made. It is not black and white. It is more of a grey choice.
When bad guys hide among good guys they have murdered the good guys. Blowing them all up is a valid and acceptable choice. It may not be the right choice, but it is an acceptable choice.
Assaulting the position with infantry is likely to be just as pointless, as the bad guys are likely just to kill all the hostages out of spite.
Sometimes all the choices are bad. Why sacrifice more good guys pointlessly? Accepting the hostages are already dead and moving on may be the valid choice.
It really depends on the nation. Countries like the USA, France, UK have a social contract to attempt a rescue. Some countries in the EU will pay ransom. Other countries like Russia, Israel, Philippines have policies when captured your already dead.
The situation in Gaza is a complete mess because of the many nationalities involved.