Hebrews 11 teaches that the men of old acted righteously, i.e. they walked closely with God and obeyed his commands, because they believed what God said and that in the life to come there would be a reward for their obedience. Hebrews 11.6 states this as a principle. The reason for teaching this was that the letter was written to people who were suffering persecution and the possibility of martyrdom. Why suffer persecution for your faith if there will be no eternal reward for holding onto it? "If for this life only we have hoped in Christ, we are of all men most to be pitied." (1 Corinthians 15.19)
If we believe that this life is all that there is, then sin doesn't matter. We might as well do what we like. In that case, "Let us eat, drink and be merry, for tomorrow we die," as Paul quoted. However if we believe that the life to come will be far, far better than this one, but that it is open only to those who live righteously and obey God, then we shall keep ourselves pure and spotless, and will 'strive for the holiness without which no one will see the Lord'. (See Hebrews 12.14; 10.32-39 and the whole of chapter 12.)
So while Paul interprets righteousness by faith as something that God instills in us through his Spirit when we put our trust in Christ Jesus (Romans 8.1-11), the authors of Hebrews see righteousness by faith as a way of living that we engage in as a result of our faith in God's promises of a better life to come for those who keep his commandments. Both of these are true. Paul does not deny the teaching of Hebrews. "Do you not know that the unrighteous will not inherit the kingdom of God?" he asks. (1 Corinthians 6.9)
The whole of Hebrews 10.19 to 13.16 is an exhortation to live holy lives of obedience to God in order to inherit his promises of a better life to come. It actually says that without such a faith it is impossible to live a life pleasing to God. (Hebrews 11.6 again.) If the reward of a wonderful and everlasting life to come for the righteous is not preached, taught and believed then people will have no motivation to resist temptation, to eschew sin, or to hold fast to Christ under threat of persecution and death.