Why not just go with "God is perfect, but humans aren't, so maybe we just misunderstood the laws?"
All knowing by necessity means knowing about the loopholes we'd exploit, or he's not all knowing.
“if you don’t have a clear example indicating how something’s bad, it’s probably Good Enough™ “