Trite nonsense.
Don’t get me wrong, I don’t think it isn’t well-meaning. It certainly is. It just seems like the kind of thing people say after their lives have turned out how they wanted them to, to rationalize past bullshit. Have you ever heard somebody who’s heartbroken, broke, and otherwise not doing terribly well insisting to those around him that all of the bad things in their lives happen “for a reason”? Of course you don’t.
Well, of course it’s easier to cope with if you just refer to the wasted years of your life as happening “for a reason”. Or, I don’t know, maybe sometimes things suck and sometimes things don’t, and there’s no shame in looking back at not figuring it out and just taking it for what it was. It certainly didn’t happen because of some greater plan. Thinking everyone’s lives fit into a movie script-like story arc is folly.
Everything happens because everything can happen.