I think you’ve got it twisted. People do awful stuff because they think it’s good. The Nazis thought Jewish extermination was helping. Theirs a Documentary on Netflix about German soldiers tasked with shooting Jews. For most of them it was a horrible ordeal. One of the biggest motivators for continuing was the thought that shirking one’s “duty” meant your comrade was going to have to do it for you. (one of the rationale for the concentration camps was to spare the death squads from PTSD)
I mentioned the Milgram experiment. If you take psy101 they’re going to tell you that that experiment proved that humans will harm each other for the sake of an authority figure. But that’s not true. Repetitions of that experiment that replaced the lab-coat guy with one wearing a military or police uniform and you went from the vast majority willing to harm people to the vast majority refusing. People weren’t obeying authority, they were volunteers who wanted to help science. They thought continuing a harmful experiment was their duty.
You’ve probably heard that quote from Fred Rogers about how when something tragic happens, “look for the helpers”. Well, it turns out that many of the people who cause tragedy think they’re helping.