The answer is simple: Because Jesus Christ offers us grace. Despite our failures, Jesus still loves us and calls us to repentance and a right relationship with Him. The fact that Jesus was willing to go to the cross for our sins and still offer us forgiveness and grace is a testimony to His character and love.
Our relationship with Jesus can be healed and restored
We can think of our relationship with Jesus as a marriage. In the same way a husband and wife can have disagreements, even deny one another at times, and still remain married, our relationship with Jesus is the same. Just as a marriage can be healed after a period of hurt and separation, so too can our relationship with Jesus be healed and restored.
Come to Him in repentance and faith and trust Him
Jesus does not ask us to be perfect, only that we come to Him in repentance and faith and trust Him to forgive and restore us. No matter how far away we have gone, or how much we have denied the truth, Jesus will never deny us.
In the end, it is not our own righteousness that can save us, but the righteousness of Jesus Christ that offers us grace and forgiveness. If we are willing to repent and accept Jesus as our Lord and Savior, then we can be sure that we will receive the gift of eternal life and make it to Heaven.