With apologies to the many charming people who say or believe it, the phrase “everything happens for a reason” is absurd, and in some contexts, offensive.
I am not talking about the reason being a physical cause for a happening—like if a house explodes and kills somebody and you say that the “reason” that it exploded was that “there was a gas leak, and a spark.” That is not what people mean when they say that everything happens for a reason. If a house explodes and someone was killed, they imagine that there was a larger reason for that event that applies to their life—to test their fortitude, for example.
For many events this is just nonsense. Hard as it may be to accept, one aspect of life is chance, contingency, happenstance, luck. You get a disease because you were unfortunately exposed to it, or because you got unlucky with genetics, not to make you a stronger person, or to test your parents. The only things that happen for a reason, happen because people do them.
But once any particular occurrence takes place, we humans, as illustrated by the phrase in question, have ability and tendency to create meaning in it for ourselves—and that meaning is real to us.
So I would prefer an expression like “whatever happens, we will make the best of it.”