In the Old Testament, I can't remember the book, there was a passage where God was answering a question from the prophet, and God said the reason why the righteous die young or is taken is to spare them from the evil that is up ahead. Where in the Old Testament is that passage?
After posting an answer, the reader found the passage for which he was looking for. "The righteous perishes, and no man takes it to heart; merciful men are taken away, while no one considers that the righteous is taken away from evil. He shall enter into peace; they shall rest in their beds, each one walking in his uprightness" (Isaiah 57:1-2).
This passage finds direct application in King Jeroboam, the first king of northern Israel. He led Israel into sin by creating a false religion. When his son, Abijah, became ill his wife disguised herself and sought out a prophet of God for help. Of course, God saw through the disguise. To her, the Lord declared, "Therefore behold! I will bring disaster on the house of Jeroboam, and will cut off from Jeroboam every male in Israel, bond and free; I will take away the remnant of the house of Jeroboam, as one takes away refuse until it is all gone. The dogs shall eat whoever belongs to Jeroboam and dies in the city, and the birds of the air shall eat whoever dies in the field; for the LORD has spoken! And all Israel shall mourn for him and bury him, for he is the only one of Jeroboam who shall come to the grave, because in him there is found something good toward the LORD God of Israel in the house of Jeroboam" (I Kings 14:10-13). Because of Jeroboam's evil deeds, his entire household would perish, but his son would die first because the Lord saw that he was the only one in Jeroboam's house worth saving.
This passage also was fulfilled in King Josiah. Josiah worked hard to turn the southern kingdom of Judah back to God, yet all his work would not be enough. But in reward for the effort he put in on God's behalf, God told him: ""Concerning the words which you have heard - because your heart was tender, and you humbled yourself before the LORD when you heard what I spoke against this place and against its inhabitants, that they would become a desolation and a curse, and you tore your clothes and wept before Me, I also have heard you," says the LORD. "Surely, therefore, I will gather you to your fathers, and you shall be gathered to your grave in peace; and your eyes shall not see all the calamity which I will bring on this place."" (II Kings 22:18-20).
It is the nature of mankind to move from righteousness to evil. "Help, LORD, for the godly man ceases! For the faithful disappear from among the sons of men" (Psalm 12:1). Or as Micah bemoaned, "The faithful man has perished from the earth, and there is no one upright among men. They all lie in wait for blood; every man hunts his brother with a net" (Micah 7:2). While the wicked are unconcerned by these trends, Isaiah noted that at least the righteous are spared from seeing the evil caused by the wicked.
In speaking of the difficulties of living under oppression, Solomon said, "Then I returned and considered all the oppression that is done under the sun: And look! The tears of the oppressed, But they have no comforter - On the side of their oppressors there is power, But they have no comforter. Therefore I praised the dead who were already dead, More than the living who are still alive. Yet, better than both is he who has never existed, Who has not seen the evil work that is done under the sun" (Ecclesiastes 4:1-3). This is the misery Job expressed. He lost so much that he thought life was not worth living. "Why then have You brought me out of the womb? Oh, that I had perished and no eye had seen me! I would have been as though I had not been. I would have been carried from the womb to the grave" (Job 10:18-19). This is also the same attitude Jeremiah expressed having to live to see the destruction of Israel. "Cursed be the day in which I was born! Let the day not be blessed in which my mother bore me! Let the man be cursed Who brought news to my father, saying, "A male child has been born to you!" Making him very glad. And let that man be like the cities Which the LORD overthrew, and did not relent; Let him hear the cry in the morning And the shouting at noon, Because he did not kill me from the womb, That my mother might have been my grave, And her womb always enlarged with me. Why did I come forth from the womb to see labor and sorrow, That my days should be consumed with shame?" (Jeremiah 20:14-18).
Returning to Ecclesiastes, Solomon also speaks of the lack of contentment in a person's life as something that ruins a life. "If a man begets a hundred children and lives many years, so that the days of his years are many, but his soul is not satisfied with goodness, or indeed he has no burial, I say that a stillborn child is better than he - for it comes in vanity and departs in darkness, and its name is covered with darkness. Though it has not seen the sun or known anything, this has more rest than that man" (Ecclesiastes 6:3-5).