I agree with @Bela-Hella
It's more like people try to find some reason after the thing's happened. Just to feel good about themselves maybe. It's human nature to think everything is about them. But seriously, how silly is that!
Someone saying "everything happens for a reason" has to be a believer in some sort of supernaturally influenced "fate" or something.
But actually, stuff just happens, regardless of what we want or think, and the 'stuff' that happened has consequences, in which, we can, to please ourselves, find at least one repercussion that we find in our favour and call it the reason the thing happened.
But that's selfish thinking. The phenomenon of anything "happening" has nothing to do with us.
More accurate would be, things happen, and there's good things and bad that come out of it.
Things don't need a reason to happen -.- they just do.