As Jon said in the comments, the mean free path before the electron-positron annihilation is longer than 6 millimeters, or at least not much shorter, and it's simply hard for them to annihilate. Most of the space is empty, the electron and positron are pointlike particles, and they're unlikely to hit each other. The mean free path that indicates the "survival distance" of the positron is proportional to the cross section and it is small.
One may get a quick estimate of the survival time by looking at the positronium. It is a bound state of an electron and a positron – totally analogous to the hydrogen atom but with the positron replacing the proton. They also don't annihilate immediately. The fastest decay channel gives the lifetime $1.244\times 10^{-10}$ seconds which, if multiplied by the speed of light (and the cosmic ray positrons have speeds comparable to the speed of light), gives about $3.7$ centimeters.
(The positronium analogy is OK because the penetrating positron basically forms some positroniums most of the time.)
On the other hand, the losing of the energy is via photons that are emitted and that may have arbitrarily low energies, so it's very easy to emit them. Long before the annihilation takes place (and it is a yes/no big event), lots of low-energy photons are emitted.
At the end, the cross sections (areas determining how hard/easy is to "hit" the target, and therefore the probability of a reaction) should be calculated by Feynman diagrams. All the relevant Feynman diagrams basically have some external electron/positron lines, some photon lines, and they are at the tree level. The annihilation differs by its internal electron line (propagator) that is very far from the "mass shell" because this virtual electron must basically interpolate between the original electron and the original positron, turn its momentum backwards in time. So the $1/(p\cdot gamma-m)$ in the propagator has a large denominator so the fraction (propagator) is much smaller than the propagators of nearly on-shell particles. That's what suppresses the annihilation relatively to the emission of soft enough photons.
It is in no way true that the annihilation happens "first". It is a big event and lots of smaller events are taking place "before" the positron and an electron approach each other closely. Even at a large enough distance, they repel each other a little bit, which makes them accelerate (positrons repel from the nuclei, attract to the electrons, thanks, Anna), and this acceleration would lead to the emission of electromagnetic waves even classically. Because the acceleration is small but nonzero at long distances, the corresponding radiation is of low-frequency, and this is matched in quantum field theory by the omnipresent nonzero probabilities to emit low-energy photons whenever the initial (and final) states contain several charged particles.