SimchaMinute by Rabbi Avigdor Miller
Therefore the frequency, the openness, of cause and result in physical things has two purposes.
One purpose is to cause people to guard themselves. Hashem wants people to guard their health. "Ki chafetz chesed Hu -- He desires kindliness." To emphasize it, He brings the results immediately and clearly, openly.
And the second purpose is to test them and see if they’ll discover the concealed hand of Hashem in their history. — Test of Emunah (#557)