It is expected that sanctions will result in collateral damage. If world leaders see that their citizens are hurting, they will be incentivised to help. Though they may not do so out of compassion, they will do so to retain power.
While economically hurting the average citizen is not ideal, it is the lesser of two evils. For example, imposing sanctions on Syria is not ideal and has most likely contributed to the instability in the country. However, allowing trade with a country that openly supports terrorism would have far more violent and thus much worse consequences. In this way, economic sanctions are effective - they are the most ethical of two unethical options.