God set a very high ideal for man - perfection (1Ki 8:61, 1Chr 12:39, Mt. 5:48, Jn 17:23, Eph 4:13, Col 1:28, Col 4:12, Jam 1:4). This seems impossible to achieve, but perfection in the original languages of the Bible does not mean never making a mistake. It means being mature, whole, or complete. Even though this seems more achievable than absolute perfection, it is still impossible without God. They only way we can be complete the way God intends is through a relationship with Him (Gen 17:1, 2Sam 22:33, 2Cor 12:9, Col 1:28, Col 2:8-12, Col 4:12, Heb 10:14). When we are full of His Spirit and walking in it, His Spirit will produce good attributes in us (Gal 5:19-23). When we become partakers of His divine nature, we are empowered to do good in His sight (2Pet 1:3-7).
Despite all of this, the reality of man is that he still comes up short of the glory of God (Rom 3:23). Man's nature is tainted toward sin (Jer 17:9-10, Lk 11:13, Jn 2:23-25, Rom 7:14-25). God understands there is a discrepancy between the real and the ideal, so He offers us repentance and grace (1Jn 1:8-2:6). He is our advocate to bridge the gap between the real (who we are in ourselves) and the ideal (who we are in Him).
Many people struggle with this dilemma, and some lose their relationship with God over it. This problem causes some to live without peace. People try to solve it their own way and miss the true, balanced solution only God can offer. Martin Luther struggled mightily with it, and his solution was the unbiblical doctrine of grace alone with no works. John Calvin struggled with it and tried to solve it with the unbiblical doctrine of faith alone with no works. They attempted to clear their consciences by resolving themselves of responsibility for their own actions. The other extreme is to try to solve it with legalism, or the doctrine of salvation by works, which is also doomed to fail. God knows we are weak and flawed. He knows we are prone to failure. He does not overlook it or justify it. He commands us to repent (Acts 17:30-31). Repentance does not make us sinless. It gives us access to the grace of God which helps us do better.
Some day the Lord will return, and His people that now battle with their fleshly nature will be free by inheriting the fullness of what Christ purchased for us with His blood (1Jn 3:1-2). 2Corinthians 1:10 speak of salvation in the past, present, and future tenses in one verse. After we obey the gospel (1Cor 15:1-4) by repenting, being baptized in the name of Jesus Christ for the remission of sins, and receiving the Holy Ghost (Acts 2:38), we can look back to that point of salvation. However, we still have to contend with our old nature. Although our old life was buried in baptism (Rom 6:4, Col 2:11-12), it tries to come back. So we have to continually mortify it (Rom 8:13, Col 3:5). God helps us do this, so we are being saved throughout our daily life. Then will come the day the Lord changes our bodies into spiritual, eternal ones that will not be tainted with sin and death (1Cor 15, Phil 3:20-21). Then the difference between the real and the ideal will be eliminated.