What makes you think that the question has an answer? The Bohr model has limited validity and this was realized from the start.
In essence, you're describing a transition from an unbound state of the electron (with positive total energy) to a bound state (with negative total energy). This cannot happen all by itself, as the extra energy needs to go somewhere, but it can conceivably happen with the emission of a photon.
In this case, the transition is no different to any transition between bound states. The Bohr model has very little to say about transitions. In essence, it states
A bound electron can only occupy the orbits in the set $\{\cdots\}$, and it can transition between them by emitting or absorbing radiation
but it doesn't say anything about the probability of such transitions happening or the mechanisms that induce them.
Unless, of course, you're thinking of an electron which (i) is already near the nucleus, and (ii) already has a low enough velocity to be in a bound state. In that case, your question "how did the electron decide to change from simply flying past the proton free to take any path to joining a quantised orbit around the nucleus?" essentially boils down to "how did the electron decide to suddenly notice the nucleus?", which you should be able to see is a ridiculous question to ask.