The story
Used as an intensifier when a scenario is considered extremely likely, such that if (implying low likelihood) is not sufficient to represent its probability of occurrence. (Whereas if implies only possibility, when implies certainty, where only the time that something happens is unknown.)
Etymology from Wiktionary, CC BY-SA 4.0.