What shall we say then? That the Gentiles, which followed not after righteousness, have attained to righteousness, even the righteousness which is of faith.
Note 1 at Ro 9:30: Paul was saying that this was the conclusion or the summary of his point in this chapter.
Note 2 at Ro 9:30: This is another one of Paul's radical statements. How can it be that people who are not seeking to be righteous can become righteous? The answer to this question lies in God's grace.
By grace, God has provided righteousness for all people, regardless of their actions. If people will believe and receive this gift, God will reckon them righteous. This is what happened to the Gentiles. They had a reputation for not seeking God (Eph 4:17-19 and 1Pe 4:3), yet the Gentiles as a whole accepted God's gift of salvation, while the Jews as a whole, who were seeking after God, rejected His gift. The reason for this was given by Paul in Ro 9:32-33 (see note 5 at Ro 9:32).
People who don't understand God's grace will always be confused and unbelieving that a person who hasn't lived a morally good life can be righteous in the sight of God, while a morally good person can be unrighteous in His sight. Righteousness is based on faith, not actions.