I don’t think that anyone would argue that running into a street to pull a kid out of the way of a car, which means that you have technically jaywalked, is an evil so big that anyone would think about it in relation to preventing the murder of the child by the car.
But, to be more serious, I think the rule exists to warn against a snowballing effect. Once you start deciding to cut corners to “save the world”, you’re basically looking at a math equation where infinity is on one side.
Let’s say, for example, that we could cure cancer by doling out cancer patients to medical researchers, and they’re told to just “go for it”, using any techniques, cocktails, surgeries, or whatever to find a cure for cancer - without regard to how much they might maim or likely hasten the deaths of their charges. Overall, perhaps this initiative kills millions and millions of people before we get all the cancers solved and done for.
Millions and millions is a “lot” but if we assume 4% growth in the human population, year on year, expanding through the universe until in about 2500 years the energy output by all the stars in the universe becomes less than our species’s caloric needs, and then we assume that our numbers stay constrained by that limit until all the stars blink out in the heat death of the universe and our numbers shrink to zero with it, then there will eventually be about 10^61 humans (a bit over half a googolplex).
Pretty much any tiny reduction you can achieve in the death rate, the millions and millions that your murdered to achieve that cure will be vastly vastly eclipsed by the numbers saved.
If you could convince our descendants to go to the gym more regularly, you’ll save just micro-googolplexes of lives - a number so big that I can’t even use words that functionally mean something to you relative to tiny, insignificant measures like “trillions”.
While a half googolplex isn’t truly an infinity, for all practical purposes, there’s basically zero cost to any inhumane, murderous act as a percentile of the potential saintliness you can gain on the other side.
But, under that light, basically anyone can justify almost anything, so long as they’re convinced that they’re the person with just such an idea that could “save everyone”. The great odds are that most of those true believers are just crazies, with a delusion of grandeur allowing them to murder everyone they hate and fear.