Yeah, I can see it being said when others really feel like they can’t say anything else. It’s natural to want to assign meaning to things that happen (because acknowledging that there’s no reason behind any event, even good ones, is scary for us. We like to make order of chaos). I see it as a throwaway type comment, it can be comforting in the right context though.