Remember ye were on the hither side of the valley, and they on the farther side, and the caravan on lower ground than ye. Even if ye had made a mutual appointment to meet, ye would certainly have failed in the appointment: But (thus ye met), that Allah might accomplish a matter already enacted; that those who died might die after a clear Sign (had been given), and those who lived might live after a Clear Sign (had been given). And verily Allah is He Who heareth and knoweth (all things).
Yahiya Emerick writes,
Think of the way in which the famous Battle of Badr came about. The Meccan caravan was on the road somewhere returning from Syria. The Meccan army was on the road heading northward, not knowing where the Muslims were, and the Muslim force was on the road from Medina, not knowing for some time that the Meccan army was on the move. None of the parties knew where the others were. Yet, the Muslims and Meccans found each other at the Wells of Badr while the caravan got away by a hair’s breadth. In those days, before GPS satellites, maps and accurate time pieces, let alone phones to coordinate groups of men hundreds of miles apart, all three parties converged in a small area at the same time. Thus, the battle was brought together by God’s plan.
Emerick, Yahiya. The Meaning of the Holy Qur’an in Today’s English (p. 829). Unknown. Kindle Edition.