Cooked rice is treated more cautiously than most leftovers in food safety guidance, and the reason is specific to the grain rather than a general precaution about starchy food.
Spores survive the cooking
Uncooked rice commonly carries bacterial spores from the soil, and spores are dormant forms built to withstand heat and drying.
Boiling kills active bacteria but does not reliably destroy these spores, so they are still present in a pot of rice that has just finished cooking.
The cooking therefore removes competing organisms while leaving the spores intact, which is a less protective outcome than it appears.
Warm rice is close to ideal for them
As the rice cools through the warm range, the spores germinate into active bacteria and begin multiplying in moist, starchy, low-acid conditions.
Rice held in a large covered pot passes through that range slowly, because the mass retains heat and the lid prevents it escaping.
The longer it spends there, the more the population grows, and the risk is a function of that time rather than of the total age of the rice.
Some of the toxins produced are not destroyed by reheating
Certain bacteria of this type produce a toxin that is heat stable and remains active after the bacteria themselves have been killed.
That is why thorough reheating does not make improperly cooled rice safe, and why the emphasis in guidance falls on cooling rather than on reheating.
It also explains why rice is singled out among leftovers, since most other foods carry risks that reheating does address.
Cooling fast is a physical problem
A deep container of rice cools from the outside in, and the centre can stay warm for a long time even in a refrigerator.
Spreading it thinly across a wide tray or dividing it between shallow containers increases the surface exposed and shortens the cooling dramatically.
Leaving it uncovered until cool lets steam escape, after which it can be covered and refrigerated without warming everything around it.
The same logic applies to other prepared starches
Cooked pasta, pulses and grains share the moist, starchy, low-acid character that supports this kind of growth, and they are handled the same way.
Batch cooking these ingredients is entirely workable provided the cooling stage is planned as part of the method rather than left to happen on the stove.
Anyone cooking for people who are more vulnerable to foodborne illness should follow the food safety guidance issued in their own country, since recommendations differ.