Then I saw the wicked buried; they used to go in and out of the holy place, and were praised in the city where they had done such things. This also is vanity.
References for Ecclesiastes 8:10
Because sentence against an evil deed is not executed speedily, the human heart is fully set to do evil.
Though sinners do evil a hundred times and prolong their lives, yet I know that it will be well with those who fear God, because they stand in fear before him,
but it will not be well with the wicked, neither will they prolong their days like a shadow, because they do not stand in fear before God.
There is a vanity that takes place on earth, that there are righteous people who are treated according to the conduct of the wicked, and there are wicked people who are treated according to the conduct of the righteous. I said that this also is vanity.
So I commend enjoyment, for there is nothing better for people under the sun than to eat, and drink, and enjoy themselves, for this will go with them in their toil through the days of life that God gives them under the sun.
When I applied my mind to know wisdom, and to see the business that is done on earth, how one's eyes see sleep neither day nor night,
then I saw all the work of God, that no one can find out what is happening under the sun. However much they may toil in seeking, they will not find it out; even though those who are wise claim to know, they cannot find it out.