The Catholic Church formally teaches that sinners must earn their way into heaven through good works.
Al Kimel at Pontifications explains why that's a bad reason. A Lutheran minister responds here.