Why should rice be rinsed before cooking?
To remove surface starch. Milling and handling leave loose starch powder on the grains, and if it goes into the pot it gelatinises in the cooking water and makes the finished rice sticky and clumped.
For dishes where you want separate, distinct grains — pilaf, biryani, most rice served alongside a curry, and fried rice above all — rinsing is what gets you there. Rinse under cold running water, or in several changes of water in a bowl, until the water runs from cloudy to nearly clear. Three or four changes is usually enough.
There are dishes where you should not rinse, and the reasoning is the same in reverse. Risotto depends on surface starch dissolving into the stock to create the creamy texture, so arborio and carnaroli are never rinsed. Nor is rice for rice pudding, for the same reason. Sticky rice for sushi is rinsed, but the variety itself is chosen for stickiness.
A second reason to rinse applies in some regions: rinsing removes a portion of surface contaminants, including some inorganic arsenic that rice takes up from soil and water more than most crops. Cooking in a larger volume of water and draining removes more.
One genuine trade-off: rice sold as enriched in some countries is coated with added vitamins, which rinsing washes away. Where that applies, packet instructions usually say not to rinse.
Soaking is different from rinsing. Soaking basmati for 20 to 30 minutes lets grains hydrate evenly and elongate rather than break, which is why it is standard for biryani.
Drain thoroughly after rinsing, or the extra water throws off the ratio.