Romans 5:7–8 (ESV) … “For one will scarcely die for a righteous person—though perhaps for a good person one would dare even to die
— but God shows his love for us in that while we were still sinners, Christ died for us.”
Christ died for the ungodly. Many have died so that others could live. But Jesus did not extend our lives by 10, 20, 30 or 40 years, rather he died to extend our lives forever, for eternity. Notice what Paul says, Very rarely will anyone die for a righteous man, though for a good man someone might possibly dare to die (verse 7). This is a difficult passage. Paul is saying that it is scarcely possible that somebody would die for a righteous man, yet maybe somebody would dare to die for a good man. There is a division among biblical scholars and commentators about what Paul is saying here. Some say that Paul is simply repeating himself, using a change in words to bring emphasis, saying it is possible to conceive of somebody dying for someone who is righteous and good. So ‘righteous’ and ‘good’ are used interchangeably, as synonyms, just two ways of looking at the same thing.
Other commentators have pointed out a subtle difference between the words that may have some significance. In biblical terms there is a slight difference between righteous (dikaos) and good (agathos). A righteous person is just, obeys the law, is straight and has integrity. The good person, in biblical terms, is characterised by kindness, warmth and love. Now we can conceive of a person who is strictly obedient to the external laws and is just, but who is cold and not particularly warm or kindly to other people. As one theologian pointed out, what righteousness does in a person is to generate respect from other people, but goodness evokes affection.
If these commentators are correct, Paul is saying that it is scarcely conceivable that somebody would die for a righteous man, but more likely and more understandable that somebody would die for a good man, for whom there was genuine affection. Whichever view we take, however, the basic point of the text is unchanged.
The point is that Jesus did not die for people who are either righteous or good. Fallen man is not kindly disposed toward God, and the conclusion that Paul reaches in verse 8 is: But God demonstrates his own love for us in this: While we were still sinners, Christ died for us. A sinner is a transgressor of the law, and so we can say that while we were being actively disobedient to God, while we were in a state of rebellion against God, while we were hostile to God, while we were ignoring God, while we were refusing to submit to him, refusing to love him, refusing to worship him, at that time, while we were at enmity with God, Christ died for us.
 Sproul, R. C. (1994). The Gospel of God: An Exposition of Romans (pp. 98–99). Great Britain: Christian Focus Publications.