The Nazis took great care to justify their measures by law and other legal means.
In April 1933 a law for "reorganization of the civil service” cleansed the civil services from socialists and communists as well as Jews. In late 1933 a law on “criminals by habit” introduced a legal framework for concentration camps. The "Blood Protection Law" of 1935 legalized race discrimination against Jews and gypsies. Later laws and legal decrees legalized the outright extermination of people based on race, belief, sexual preference and other categories
(chronological index).
In all of these cases first the policy was thought up, then legal opinions were established to justify the policies. Laws were created to have a legal basis for the policy implementation.
These where needed because some people would not follow the policies without better justifications and legal protection.
Defendants at the Nuremberg court said they acted within those laws or followed legal orders. The judges did not swallow those justifications as the laws and orders clearly contradicted basic humanitarian ethics.
The Bush administration acted in similar ways. A policy was thought up and then a bogus legal opinion was written to justify even a obviously illegal policy. When someone made a stink, Congress was pressed to implement a law that would legalize the deeds. Thus when the policy intention was to torture, Yoo wrote a memo justifying torture and Congress later mangled that into a law that gave the CIA legal backing to continue to torture. The pattern was also followed with FISA. The intention was to listen to any communication. Then legal justifications were written to allow for that. When some folks blew a whistle, and the policy became public knowledge and outrage followed, Congress was pressed to establish the illegal stuff as legal through a law and to even give the telcos retroactive immunity. When no one in the U.S. made a stink, like over renditions, the step of introducing a justifying law was not deemed necessary.
The Israeli Defense Forces seem to follow the same pattern. Establish an intention and a policy, than have someone come up with a legal justification:
The idea to bombard the closing ceremony of the Gaza police course was internally criticized in the Israel Defense Forces months before the attack. A military source involved in the planning of the attack, in which dozens of Hamas policemen were killed, says that while military intelligence officers were sure the operation should be carried out and pressed for its approval, the IDF's international law division and the military advocate general were undecided.
After months of the operational elements pushing for the attack's approval, the international law division gave the go-ahead.
Commentary to the Geneva Convention generally considers policemen to be "protected persons" under the convention. To target them was illegal. Continues Haaretz:
In spite of doubts, and also under pressure, the division also legitimized the attack on Hamas government buildings and the relaxing of the rules of engagement, resulting in numerous Palestinian casualties.
"Hamas government buildings" are first of all government buildings, for example hospital and schools. As far as they are needed for the public life and are not used as military positions they must also be protected.
In the division it is also believed that the killing of civilians in a house whose residents the IDF has warned might be considered legally justified, although the IDF does not actually target civilians in this way.
Oh really? The IDF even told civilians to go into a house only to then bomb the house.
Many legal experts, including former international law division head Daniel Reisner, do not accept this position. "I don't think a person on a rooftop can be incriminated just because he is standing there," he said.
But again the legal opinion was not formed as a neutral legal opinion based on some accepted normative ethics or basic law, but was drawn up to justify an intended policy, in this case obviously indiscriminate killing of civilians, despite its obvious illegality.
"The army knows what it wants, and pressure was certainly brought to bear when legal advisers thought that something was unacceptable or problematic," an operational military source said.
According to a senior official in the international law division, "Our goal is not to tie down the army, but to give it the tools to win in a way that is legal."
Does anyone believe the Nuremberg judges would have accepted such nonsense as legal?