He gave us rules so we would know right from wrong. He knew we couldn’t keep the rules. That’s why He sent Jesus to us.
In Corinthians it says, “All things are lawful for me, but not all things are helpful; all things are lawful for me, but not all things edify” 1 Corinthians 10:23 (NKJV).
The Bible speaks of a peace that surpasses all understanding. That peace comes from knowing our transgressions are not held against us.