It was God's rules and not theirs. It was when they IGNORED God's instructions that they got trouble, not when they followed them.
The six million killed in the death camps by the Germans were, for the most part, Orthodox observant Jews.