...The "plan of the ages", as explained by the Apostle Paul, is that all of this is done for the glory of God.
Ephesians 1:6,7 To the praise of the glory of His grace, wherein he hath made us accepted in the beloved. In whom we have redemption through His blood, the forgiveness of sins, according to the riches of His grace;
Satan thought that Calvary was God's great defeat; but it turned out to be God's greatest victory and Satan's defeat. As Christians, our future is secure in Christ no matter what our circumstances may be. In fact, God's plans for His own are so wonderful that our minds can't begin to comprehend them. -- 1 Corinthians 2:9.
For those who love God, every day is a good day -- Romans 8:28. It may not look like a good day or feel like it, but when God is working His plan, we can be sure of the best. It's when we fail to trust Him or obey Him, when our love for Him grows cold, that life becomes dreary. If we walk in God's wisdom, we will enjoy His blessings.