Why does anyone say this phrase? What does it really mean?
Assigning order to future events gives us comfort, even if these future events are inherently unknown.
Order and predictability allow us to build and test models in the real/current world. The known eases people.
Fear is rooted in the unknown. But if we convince ourselves that the future is taken care of, it turns the ephemeral to the quantified.
This phrase doesn't even guarantee overall positive outcomes is the interesting part - but we can still draw comfort from it. Even if the future is meant to be dark, the idea of it being understood is just as important.
Nobody panics when things go "according to plan." Even if the plan is horrifying! If, tomorrow, a gang-banger will get shot, or a truckload of soldiers will be blown up, nobody panics, because it's all "part of the plan". - Batman's Joker
Does being told that "everything will work out how it should" change anything? Does it allow us to release our anxieties and go with the flow? Does it make us passive and accept the fate lined up for us? Maybe its a bad thing to tell ourselves these things in some situations. You have to take care when telling someone this - because inherently you are telling them to just let things happen. If you would rather advise or experience change, do not tell yourself or others this.
This phrase also plays into the idea of the Metanarrative: a narrative about narratives of historical meaning, experience or knowledge, which offers a society legitimation through the anticipated completion of a (as yet unrealised) master idea.
People prefer to be a character in a story, no matter that character's circumstances, rather than to be an unknown with an unwritten (though potentially brighter) future.