In this rejoice, through faith for a salvation ready to be revealed in the last time. In this you rejoice, though now for a little while, if necessary, you have been grieved by various trials, so that the tested genuineness of your faith—more precious than gold that perishes though it is tested by fire—may be found to result in praise and glory and honor at the revelation of Jesus Christ.
1 Peter 1:6-7 ESV
God has plans He wants to accomplish through each of us. However like any other job we must be qualified for the task. God chooses trials and suffering to push us towards our calling. Peter here uses the example of gold. Gold is heated to remove the impurities so that the gold can be pure.
God sees the greatness inside of you and He wants to make you as pure as possible. God wants to use you to bring praise, glory, and honor to Him. He does this by trials. Although you may not enjoy the trial, appreciate what Christ is doing in you in the trial. Suffering with Christ is a good thing.