The probably of failure should be calculated considering material defects, forces larger than predicted, simulation errors, and all other causes the factor of safety is designed to protect against.
Then the engineering process can allocate those probabilities in the most efficient way.
For example, in a rocket it might make sense to make the engine bells stronger (decreasing probably of failure) while making the fuel tanks weaker (increasing probability of failure). The overall probability of failure remains the same, but perhaps the craft ends up lighter/cheaper/better than it would be if all components just built in a fixed factor of safety.