The reason you can't put warm food in the fridge is because the warm food or hot food increases the inside temperature of the refrigerator.
When the inside temperature of the fridge gets warmer then it puts other food in the fridge at risk of getting bacteria and salmonella in the food.
The food gets warmed up inside the fridge from the warm or hot food.
So you should allow the warm or hot food to cool down some before putting it in the refrigerator.
I have put hot and warm food in the refrigerator before though and never had any issues with food poisoning.
But it's just a risk you take when putting warm or hot food in the fridge.
You could place the hot or warm food in the freezer for a bit cool it down faster and then put the food into the refrigerator.