We have to keep our hearts. The Lord tells us to walk before Him with a perfect heart. If we look at Old Testament kings, many did not. Many did please the Lord and yet did not tear down the high places, etc. Judging by the writings, the Lord received them, even though they were not perfectly obedient. Usually if they did things displeasing to the Lord, it shows where they repented and endeavored to get with the program.
I'm sure the same could be said with us at times. We lack some times or get bound up with stuff.
In the New Covenant, when Jesus compared the Law, in EVERY case, the law of liberty exceeds the requirements of the Law of Moses. We are required to fulfill the intent or spirit of that law. Grace is given to enable you to do this. Many of those laws were types and shadows of New Covenant requirements. Not one little bit of them will pass away until they are fulfilled.
The Lord is merciful, and if you're endeavoring to serve Him, I would guess that the Lord would be inclined to show you mercy. We can't take that for granted, as we are warned about the Israelites as are examples.
If you have a bride, or are betrothed to one, and she behaves abominably, she is in danger of being thrust out with those you won't have anything to do with. She WOULD be too (permanently), were it not for the opportunity to repent (if given). We're to seek the Lord while He may be found. Without that repentance and forgiveness, we'd be just like all those who give themselves to that behavior.
We CANNOT take for granted the Lord's mercy. If we turn our backs on the Lord, we're in grave danger.
Our hearts must be kept diligently, because the heart of man is given to change. If we don't walk with the Lord, we choose bad stuff and the enemy gets in and starts working your flesh. You walk carnally (which is emnity). You can become idolatrous (worshipping another image of your making), can become covetous (which is idolatrous), working strife (every evil work), "froward" or working "iniquity". The Lord WILL judge your works and if anyone thinks they can fornicate, lie, offend people, judge them from your evil fleshly standard, etc. and get away with it, the Father "by no means acquits the guilty". ALL must repent and believe, or you won't just spend a thousand years in Hell.
If the Lord gives you your portion with the unbelievers, we're not talking about a 1,000 years.
Thank God that He does not withdraw His lovingkindness when we sin, but if you continue to do things that He hates, you put yourself in a position where you account for yourself and are judged by the Lord. If you harden your heart continually in this judgment, He might give you over because He won't violate your free will. Life is very serious, even more so as a believer, because we're responsible to walk in what we know, with the ability grace provides (something a "sinner" doesn't have).