Everything has a function in the Universe, even suffering. Everything and everyone can serve as instruments of Life to teach a lesson, help or be a companion, or temporary enjoyment.
There is no chance, accident, coincidence, luck, or bad luck. Everything follows an order in the Universe, there is no chaos, mess, and disorder. There are effects or consequences of causes put into action, in addition to meaning, purpose, and function.
In the face of any challenging, uncomfortable, or painful situation, a good question is: what does Life want you to learn with that?