“And we know that all things work together for good to those who love God, to those who are the called according to His purpose. For whom He foreknew, He also predestined to be conformed to the image of His Son, that He might be the firstborn among many brethren. Moreover whom He predestined [to be conformed to the image of His Son], these He also called; whom He called, these He also justified; and whom He justified, these He also glorified.” Romans 8:28-30.
Believe it or not the above question has an incredibly simple answer, but the things you have to understand to grasp it are not so easy. Let us start with a question.
“I waited patiently for the Lord; and He inclined to me, and heard my cry. He also brought me up out of a horrible pit, out of the miry clay, and set my feet upon a rock, and established my steps.” Psalm 40:1-2.