It depends on who is saying, “Everything happens for a reason.” There is a sense in which that is true. The Scriptures teach Christians that everything works out for their good. The sad truth is that if you’re outside of Christ, at the end of the day, things do not work out for your good.
We mustn’t lapse into a fatalism that says, “It will all turn out for the best,” because we would be putting our head in the sand if we thought everything turns out for the best in this world. Instead, Scripture teaches us that, even though we don’t understand it, God is working the best for those who believe in Him.
The notion that everything will turn out for the best is a fallacy. That everything happens for a reason is, from one point of view, a biblical principle because God is sovereignly and providentially overseeing everything that takes place.