Rain Rot happens with an immune system deficiency mainly brought on by the lack of Vitamin A. It is an 'indirect' result of the deficiency.
So -- pasture horses challenge their immune systems MUCH more than stalled horses in that their skin is exposed to the elements and the bacteria and fungi that cause rain rot are normal inhabitants of soil. Bottom line is that pastured horses probably have 100X more exposure to the environmental causes and challenge their inadequate immune system much more.
I have seen much more of it in horses kept outside, but there are many stalled horses that get it. Of course, there is no way to tell if they get their exposure in their stalls (doubtful) or during turn-out. They just usually do not stand around soaked to the skin like pastured horses do. Even if they are turned out to roll and play, their skin is much more likely to stay dry and the dirt and soil is much less likely to come in contact with the horse's dry skin.