The reason why we even have morals is because we benefit from living in a group (a society each a little different with their own culture) rather than fending for ourselves. When we live in a group there is a fair distribution of responsibilities where everyone contributes in some small way but everyone benefits in a large way. But to live in a group there need to be rules so that it continues to be an advantageous situation for each individual.

Without rules (aka morals) people pillage, rape and hurt those around them which is not advantageous to the members; you'd be better off living far away in seclusion from others if that was the case. That is exactly why we have a criminal system; to isolate those who don't follow the rules so that the rest of us can continue to benefit from being a member of the society we are a part of.

The rules of any given society evolve and change with the times just like how plants and animals adapt to their environment. They are different for a million reasons, and whether you judge them as right or wrong is completely relative to your own moral code of the society to which you belong. So with that in mind also keep in mind that there are basic human rights that apply to everyone (this includes the right for an innocent member of a society to live and not be sacrificed or punished in any way) [absolute moral code]

And since we are becoming more and more a global society, we have a need to agree on a common moral code at the global scale which we are seeing take place now as we isolate those societies that don't follow the rules (society is analogous to prisoner here) by way of government sanctions and such.

So yeah, it becomes necessary for Society A to intervene when Society B becomes a threat to the well being of Society A OR when Society B is in violation of basic human rights to those in their own society because both Societies A & B are subsets of the Global Society which must be protected by all included for the membership to be beneficial.