If a tragedy befalls us, it almost always comes unexpectedly; that is because we cannot see the future. On the other hand, our Lord and Protector is not subject to our limitations. The bible says, God knew us before we were even born. If this is true, He also knows every mistake we will make and every hardship we will endure, before they even happen.
When we are in a very painful situation, we pray for strength and deliverance. While we wait for an answer to our prayers, oftentimes it can seem like God will never respond. In fact, it may seem like He can't even hear us. The truth is, God made a solution before our problem even existed.
So then, if God created our solution before we were even born, then He also knew about our painful ordeals in advance. Why does He still let them happen? That varies for each individual. We are all unique creatures with unique problems. Sometimes God will use our suffering to tell us we need to change. Other times, He uses adversity to bring us to another place in life where He needs us most. Whatever the reason is, we can rest assured God is using our suffering to make us stronger.
Nothing is by accident in our lives; everything is according to His plan. We can trust in Him because, not only does He know what truly is best for us, He sees everything in advance. All of life's variables are before Him, and He arranges them in an equation that equals eternal life, for those who believe.
Whatever struggles we have, let us always remember that God loves us. He knew exactly the mistakes we would make before the creation of the world. He knew every storm that would come our way before we were given life. Our deliverance and path to victory was also prepared for us in advance. Everything is happening for a reason and all according to this plan, which is eternal life and salvation for those who love Him.
(Scripture References: Romans 8:28, Jeremiah 1:5)