The point of behaving well is to show the results of our salvation. It doesn’t come by hard work, but it’s one of the results.
So why do people suddenly start behaving better once they meet Jesus? (And how is it even possible?) Here’s the answer:
Philippians 1:11 May you always be filled with the fruit of your salvation—the righteous character produced in your life by Jesus Christ—for this will bring much glory and praise to God.
And should we be able to expect that we see believers behave righteously? The answer is yes:
Philippians 2:12-13 Work hard to show the results of your salvation, obeying God with deep reverence and fear. For God is working in you, giving you the desire and the power to do what pleases him.
The reason is that this righteousness before God comes not from how we live, but by faith in Him:
Philippians 3:9 I no longer count on my own righteousness through obeying the law; rather, I become righteous through faith in Christ. For God’s way of making us right with himself depends on faith.
And it’s God who does the work.