We do not earn our salvation through anything we do. Salvation by works? Absolutely not. But this does not mean that good works are irrelevant to salvation. In fact, as this passage makes abundantly clear, salvation and good works are closely connected. Good works do not earn salvation, but they do follow salvation. To put it differently, we are not saved BY good works, but FOR good works. Good works are an expression of the fact that we have been saved by grace.