In life, we end up with a series of goals. Some are practical, some long-term, and some are moral. While the everyday stuff requires relatively little thought, the latter two categories present a challenge in that we have to decide how serious we are.
A long-term goal, like having a civilization, does not strike us as “negotiable.” Like a practical goal, it concerns our survival and adaptation, but in a do-or-die sense. Similarly, moral choices reflect who we are, and where we take our stand defines what we think of ourselves as well as our future.
When you have a goal that cannot be compromised, you will be thinking in terms of “by any means necessary.” This means that the goal is so necessary and good — a more difficult matter with moral decisions — that you will do anything to achieve it.
The classic example from nature is the trapped animal. It will eat off its own foot to escape, but before then, it will viciously attack anyone or anything in its way. Trap a wild creature, and you take on the risk of suffering the results.
Another one might be saving your family. Aliens attack your city, and you will do anything to make them survive. If someone gets in your way, you will kill him; if you are running with another person as an alien pursues, you will kick out his ankles so they take him instead of you.
Sounds horrible? It depends on the goal. Your choice with the aliens consists of dying or living. You do not want to die, so everything else is on the table. This is a ends-over-means calculus, meaning that goals are more important than the choice of methods used to achieve them.
On the other hand, we present the pacifist. He has sworn off all violence to the point that, when pursued by aliens, he allows himself and his family to be killed rather than strike another. If assaulted, he lets it occur, so that he does not stain himself with violence.
All of us are somewhere in the middle. We would save our family by any means necessary, but will do just about anything to avoid some means, like killing a child or cannibalism. We try to avoid certain means in everyday life, but if things get tough, those constraints are negotiable.
A sane society operates by ends-over-means, which requires it to have goals that are both necessary and good, meaning that they enhance life. Since life rarely comes down to yes/no choices at first, these societies try to avoid some methods, but break the rules when necessary.
For example, most societies eschew torture. However, when one guy knows the location of the nuclear device that is about to go off, we break those rules and allow our bad guys to go to town on him in whatever ways they deem necessary, even killing his child in front of him.
After all, it is most important to avoid the nuclear explosion. It is less important to avoid harming a few people, even if the numbers are not really the question. Suppose one must kill five to save five; still, one avoids being weak in the face of adversity, discouraging other parties from setting up similar disasters in the future.
Psychologists often use The Trolley Problem to prove this point. A train runs down a track with a fork ahead; if it goes to the left, it hits one person who is about to invent a cure for cancer; if it goes to the right, it kills fifteen orphans who may or may not invent cures for cancer.
The means-over-ends approach says that we save as many lives as possible (you might recognize a hint of utilitarianism here). On the other hand, the ends-over-means approach says that we save the person with the highest value to the rest of us, the guy who will cure cancer.
Surly naturalists like myself might assign less value to curing cancer, since we wish to avoid those who are genetically prone to disease, and we might argue that we are saving more lives in the future by allowing the cancerous to die so that future humans are 100% cancer free.
In any case, you can quickly see how humans divide on this approach. Those who are serious about their goals tend to choose ends-over-means; those who choose means-over-ends have less pressure to choose goals, and tend to over time degenerate to convenient and familiar goals instead.