In this purpose-filled world, God directs its course by His hand of providence. He has a plan and He is executing that plan, not just in the big things, but also in the moment-by-moment details. The deist, Benjamin Franklin, captured half of the truth when he wrote:

For the want of a nail the shoe was lost,
For the want of a shoe the horse was lost,
For the want of a horse the rider was lost,
For the want of a rider the battle was lost,
For the want of a battle the kingdom was lost,
And all for the want of a horseshoe-nail.

In his book, Biblical Doctrines, another Benjamin (B. B. Warfield), offers this reminder of how God is behind all those details (like horseshoe-nails), and how He constantly works in history:

It was not an accident that brought Rebecca to the well to welcome Abraham’s servant (Gen. 24), of that sent Joseph into Egypt (Gen. 45:8; 50:20: “God meant it for good,”), or guided Pharaoh’s daughter to the ark among the flags (Ex. 2), or that, later, directed the millstone that crushed Abimelech’s head (Judges 9:53), or winged the arrow shot at a venture to smite the king in the joints of the armor (1 Kings 22:34). Every historical event is rather treated as an item in the orderly carrying out of an underlying Divine purpose; and the historian is continually aware of the presence in history of Him who gives to the lightning a charge to strike the mark (Job 36:32).