If you choose to enslave someone, you can never trust them to not rise up and murder you in your sleep. There is always the chance that they will think it through and reach the morally correct (for them) course of action--to kill the slave-owner. So logically, if you don't want to be murdered in your sleep, you can either abolish slavery, or you can lock all the slaves up every night. Either one of those strategies would work. In different eras, both have been considered the ethically correct action.
The morally correct response for someone denied reproductive freedom by, for instance, laws supporting polygamy, is to break the laws abolishing adultery. If one man has four wives, there will generally be three other men who shouldn't really consider marital fidelity to be all that important. Or maybe some of them won't consider strict heterosexuality to be a culturally critical ideal.
And if that particular society further undermines those men--perhaps by vigorously defending the wives and daughters, and beheading the ones seeking alternate arrangements--they would be morally justified in committing violence against the people and institutions who denied them those benefits of having a civilized society. It is by no means guaranteed that such people will be able to precisely or accurately identify the "correct" people or institutions. They are right to lash out. They are getting shafted by an unfair system, after all, and that system is unlikely to change for their benefit if they continue to passively support it.
As such, it is also morally justified for other societies, recognizing that violent and possibly ignorant potential, to either proactively defend themselves against it, or to deflect the violence towards alternate targets. It is therefore possible for multiple sides of a violent and bloody conflict to all be acting in a manner that they consider to be morally correct.
It would be better for everyone, all around, if civilization did not choose to stratify itself such that a permanent underclass exists. If fewer people were treated unfairly, fewer people would lash out against the unfairness. As the violence is itself usually applied unfairly, unfairness begets unfairness, injustice breeds injustice, vengeance calls for more vengeance.
If you don't want unending spirals of oppression and rebellion, you have to take proactive measures to peacefully increase the perception of fairness in society. There are many ways to accomplish that. If you don't want peaceful, civilized people to wind up dead because there were too many people that saw no benefit from being peaceful and civilized, you should be pushing to bring more benefits of civilization to more people. Or you should be exterminating the "uncivilized" people. Either way. I personally consider one of those to be ethically abhorrent, but civilization as a whole still seems to be on the fence about it.