How does the concept of Hashgacha Pratis and the law of not endangering one’s life coincide:
We are taught that it is an absolute prohibition to enter ourselves into danger and rely on miracles. The reason for this is because G-d does not always perform a miracle for a person, and one must have enough merits for a miracle to be done to take him out of a situation of danger. Now, one may rightfully ask as to why this is the case, as we are also rightfully taught that everything that happens to a person is by divine decree, Hashgacha Pratis. Thus, if G-d did not decree for something to happen to someone, then it should not happen regardless of the situation and as to how dangerous it is. For example, if G-d did not decree for someone to get hit by a car, then seemingly he should not get hit by a car whether he’s walking on the sidewalk, or sprinting onto a busy highway with flying cars? What is incorrect about this notion? The answer is that G-d created the world with a certain system of nature, and the more that is required to override the natural system, the more merits one needs in the eyes of G-d. In other words, while an individual may not be deserving of getting hit by a car while walking on the sidewalk, and thus G-d will not make the rare event occur of a car going out of control and slamming into the sidewalk, this may not be the case if the person decides to sprint down I-95. In that case, it is not G-d who is directly deciding for the person to get hit by the car, but rather His rules of nature that He embedded into creation, which have nothing to do with a person’s innocence or guilt, but rather with the natural order of the world. Now, while of course G-d retains the ultimate decision of whether this individual will die as a result of the natural danger, He does not choose to override this natural danger so easily and freely, and requires that the potential victim have enough merits to deserve being saved, and have G-d intervene to stop the laws of nature which he created from applying to him.
 See Sefer Chinuch Mitzvah 546; Likkutei Sichos volume 30 Parshas Vayeishev page 297.
 See Chinuch ibid.