The purpose of God working in our lives is always to glorify God.
John 16:12-14 …12 I still have much to tell you, but you cannot yet bear to hear it. 13 However, when the Spirit of truth comes, He will guide you into all truth. For He will not speak on His own, but He will speak what He hears, and He will declare to you what is to come. 14 He will glorify Me by taking from what is Mine and disclosing it to you.…"