When I applied mine heart to know wisdom - This is the reply of the wise man: "I have also considered these seeming contradictions. God governs the world; but we cannot see the reasons of his conduct, nor know why he does this, omits that, or permits a third thing. We may study night and day, and deprive ourselves of rest and sleep, but we shall never fathom the depths that are in the Divine government; but all is right and just. This is the state of probation; and in it neither can the wicked be punished, nor the righteous rewarded. But eternity is at hand; and then shall every man receive according to his works. He that spends his life in the eat, drink, and play, will find in that day that he has lost the time in which he could have prepared for eternity.
These verses supplement Ecclesiastes 8:15 with the reflection that the man who goes beyond that limited sphere within which he can labor and be contented, and investigates the whole work of God, will find that his finite intelligence cannot grasp it.