This isn't just to be pedantic, I'm currently reading The Third Reich trilogy by Richard J. Evans, and this is an instance of the Nazi emphasis on appearing as though they had a legal basis for their actions, even well into the dictatorship. It's one of the most bizarre parts of the story to me.
The euthanasia was attempted to be done in secret, so under what circumstance the backdating (or even the existence) of the law could possibly have been useful is beyond me. Under Nazi victory, those involved were safe from prosecution, and in case of defeat, the law could not have saved them.
It's like something straight out of the movie Brazil, though not being fiction and having resulted in the death and suffering of countless real people makes not possible to enjoy the insanity of the situation.
I highly recommend the books, though I don't exactly have a weak stomach, and many parts were quite difficult for me. It reminded me quite a bit of Robert Fisk's The Great War for Civilisation, which was also extremely long and dense with suffering.