"Although a wicked person who commits a hundred crimes may live a long time, I know that it will go better with those who fear God." (Ecclesiastes 8:12)
The Teacher counsels obedience to the king's command and warns against attempting to discern God's ways from within the limitations of human wisdom: no one can comprehend what goes on under the sun. Despite all their efforts to search it out, no one can discover its meaning. Even if the wise claim they know, they cannot really comprehend it. Although a wicked person who commits a hundred crimes may live a long time, I know that it will go better with those who fear God, who are reverent before him. Yet because the wicked do not fear God, it will not go well with them, and their days will not lengthen like a shadow. There is something else meaningless that occurs on earth: the righteous who get what the wicked deserve, and the wicked who get what the righteous deserve.
The Catechism draws from Ecclesiastes 8 the honest acknowledgment that the distribution of earthly rewards is not always just - and that this recognition, rather than destroying faith, points toward the judgment beyond death where all accounts are settled (CCC 1040).
Brothers and sisters, it will go better with those who fear God. The Teacher maintains this conviction even while acknowledging the apparent injustice of observed outcomes. The fear of God does not guarantee prosperity in this life but points toward the life where all reversals are reversed. Fear God. It will go better with you - not only now but finally.
Lord God, it will go better with those who fear you. Give us the fear of you that trusts your final justice even when the present distribution seems unjust. Through Christ our Lord. Amen.