Boom! There it is! The central theme of the book of Job.
All of the verbal sparring between Job and his frenemies, from chapter four until Bildad asks his question in chapter twenty-five, finally drives at least one of them to ask the right question,
"How can a man be righteous before God?" (Job 25:4).
Up until this point Job's frenemies, and even Job himself, attempt to answer the question, "Why is Job suffering?". No one offers a satisfying answer.
Job already believes in and practices substitutionary atonement; yet, their accusations force him to revisit this doctrine. They've looked outwardly for evidence of Job's righteousness as if the origin of righteousness is performance-based. They've looked around and concluded that the wicked don't suffer as does Job. Job in vulnerbility and confusion looks upwardly to God and asks, "Why am I suffering? God doesn't answer.
"How can a man be righteous before God?" is the right question. And everyone constructs and lives out of their answer to that question.
Everyone looks outwardly and unconsciously declare that they are righteous because they don't:
vote a particular political party,
belong to a certain theological tribe
or that they are skinny,
or, that they've never been divorced,
they homeschooled their children and took them to church,
give generously to a charitable cause.
Many look around and believe that they are righteous because they, unlike others, have never received a traffic violation, they eat healthy and exercise, and they are kind to others.
It is only as we understand and submit to substitutionary atonement that we discover the righteousness that God requires. Jesus is the only perfect man who fully loved and obeyed God at all times, and who fully, unselfishly, and perfectly loved others. He offered Himself to God and died on behalf of those who see their imperfect love of and obedience to God and who fail in their responsibility for other's welfare. God accepted the death of His Perfectly Righteous Son on the behalf of guilty sinners and proved that acceptance by raising Him from the dead. Those who trust His substitution receive His righteousness.
Job and other OT faith-walkers acknowledged their guilt and offered burnt offerings as they looked, in faith, to the coming of the Perfect Substitution, the Only Righteous One. We, NT faith-walkers, look back to Jesus' death, burial, and resurrection and celebrate His substitution as sin's penalty, righteousness' perfection, and hope of eternal life.
Righteousness is performance-based; Christ's performance on our behalf!