RAM bitflips randomly, period. It's just how it works. A cosmic ray can hit the memory chip just right and flip it, there's no way to predict or control that no matter how "stable" your machine is. ECC still does the same, it just has a parity bit on each line to confirm against and flip it back, as needed.
Cosmic radiation bitflips are BS. No cosmic rays reach ground level. The chance of a, say, Al-28 nucleus successfully penetrating the entire atmosphere is as close to zero as it could be possible to get. Basic physics. Something with such a high charge density won't penetrate ~100km of atmosphere and magnetic field. Even a basic muon wouldn't get through a sheet of aluminum foil and those are still capable of actually getting (barely) through the atmosphere.
The chances of cosmic radiation causing a bitflip are pretty much in the range of "Elvis coming into town on Nessie." Radiation originating from inside the system itself is much more likely a cause.
Your ground-level bit flips are most likely caused by terrestrial radiation sources, not extra-terrestrial ones. This is just basic physics.