Have you ever been through something difficult?
Of course you have, that's part of life.
Life is messy and painful. Period.
And, often, in the midst of a struggle, people want to make sense of it all. Why me? Why this? Why now? Somehow, it seems like it might be more tolerable if we could just understand the reasons. So we look for explanations and answers. We want someone to blame. And when our earthly options fall short (and sometimes even when they don't and are instead starting us right in the face), we often blame God.
It's God's will.
Everything happens for a reason.
God has a purpose.
God has a plan.
And while those things might be independently true (well, I'm not sure about the first two, but I do believe the second two...God does have a purpose and God does have a plan) those things may not have any connection to the circumstances of my trials.
It can be tempting to soothe our own wounds or try and soothe someone else's by "helping" to justify what's happening with the notion "everything happens for a reason", but please use this please cautiously...since the reason may (likely) not be God (as you're suggesting) but instead it may be
The consequence of our own actions
The consequence of someone else's actions
Learned (bad) behavior
Or maybe (sorry to be so glib)...just because $h1t happens.
Really, all kinds of things happen without any real explanation or answer and pretending the answer is God is really not helpful. Sometimes we just have to sit in the discomfort of the messiness if life. ..without an answers at all.