Rinsing produce right before use minimizes microbial growth because washing removes surface contaminants and the remaining moisture doesn't provide a long enough window for significant microbial proliferation before consumption or cooking.
Washing produce removes dirt, debris, and potentially harmful microorganisms like bacteria, viruses, and parasites that may be present on the surface. If you wash produce too far in advance, the remaining moisture can actually create a favorable environment for microbial growth. Microbes thrive in moist conditions, so washing and then storing wet produce allows them to multiply. By washing right before cooking or eating, you remove the contaminants and minimize the time available for any remaining microbes to multiply to significant levels. This reduces the risk of foodborne illness. The key is to remove the contaminants without providing a prolonged moist environment that encourages microbial growth.
For leafy greens, use a salad spinner after washing to remove excess water. This helps prevent spoilage and keeps the greens crisp if you need to store them briefly after washing.