Because rain can be lovely and comforting (to be inside)?
Speaking for myself, I think I sleep better with rain because I feel a comforting connection to the natural world around me. Meditation with rain and ocean waves is also good. Also I grew up in a rainy place, and I associate rain with comfort (when in a dry place not being rained on myself).
And yes, it also drowns out the contrast there otherwise might be between silence and noises, which could otherwise get my attention while sleeping.