Good works are a sign of Christ's life within us. We do not perform them in order to remain in God's family. We keep trying because we are afraid we will lose our relationship with God. We want to serve God and glorify Him in our lives. But there's a problem.
Sin is the problem.
Christians still sin after their conversion. You know, God could have dealt another way with sinning Christians. But God chose not to do that. He chose rather to leave us here, imperfect though we are, to be His ambassadors. And He made provision for cleansing the believer by means of acknowledging our sin to Him in confession and claiming the forgiveness over it which Christ provided through the Cross.