For many dogs going out in the rain is not about getting wet.
Dogs have more sensitive ears and hearing than people. The sound of the rain is amplified in dog's ears. As humans, many of us love the sound of rain but to dog's rain sounds like nails on a chalkboard!
Dogs once lived in the wild. However, many modern day breeds were never wild dogs but have always been human companions. We often think that it's a dog and he should be able to go out to do his business on a rainy day.
Just as humans do not want to get wet neither do dogs!
We do not like the pelting rain or the soaking feeling. Some dogs would rather hold it than go out and do their business.
When rain moves through it is using part of a frontal system. These weather systems are often accompanied by changing barometric pressure. Changing barometric pressure also affects a dog's ears by making them feel like they need to pop (a similar experience for humans during air travel or when driving through mountains).
Some dogs have a thunder phobia. This fear not only has a psychological element but dogs experience the physical symptoms related to amplify the hearing and changes in barometric pressure.