It is an interesting question. I think, mostly rainfall does not cause soil erosion or effectually disturb soil microbial communities, but continuous heavy rainfall caused soil erosion and wash away soil and root-associated bacteria to some extent. So, in this case, microbes living inside the plant tissues, e.g., root and leaves and-microbiota migrate into the rhizospheric soil and play a role in plant growth. Please these articles related to soil structure and quality;
In addition to what has been already written by Salma Mukhtar, consider an estuarine complex where many bacteria are found, which are otherwise terrestrial. They get washed away (runoff) and end up in the river/channels/canals/ and ultimately end up in the estuary. Heavy rain can cause trees to fall and thus the root system gets exposed. Once it happens, the loosely attached soil or rhizobial microbes get easily washed away by rainwater. Rainwater can cause the root-microbe to detach from their host and get into the gorundwater as well.
Could be possible however you also can find native rhizobia in wetlands, that is the matter of adaptation (evolution)and depends how much rainfall and in which region/s take place.
The amount and distribution of rainfall directly affected soil moisture, which determined the survival and proliferation of rhizobia as well as growth of the host legume.
you can read the attached research about the ecological Indicators of Native Rhizobia in Tropical Soils