Modern fridges are not designed to chill food down from cooking temperatures and are not capable of maintaining the correct temperature overall when doing this task.
Industrial or commercial fridge units might be capable, it basically comes down to the radiator capacity. You will not that heavy duty units have much larger finned radiators around the back, really heavy duty ones will have water cooled radiators.
Your home fridge simply does not have the heat transfer capacity, and it is not an economic prospect to manufacture them for consumer use.
In addition, it is not just the absolute temperature that is the issue, it is also the volume of material to be chilled, so a small mug of coffee will be ok, apart from the steam condensing on inside surfaces - which makes for an environment for listeria monocytogenes to grow. A 5 litre container of something that is around 30C will take quite some time to cool down and will raise the temperature of the fridge for long enough to reduce the shelf life of other food stored in it.
Yes, you can get chillers that do have the capacity to chill food down very quickly, but you will find these are used in specific enterprises. These are not fridges, they only achieve the same temperatures as a fridge, but they can soak up heat energy much much faster, but they also use a lot of energy in doing so.
Any HVAC engineer will tell you that one of the most expensive commodities in the home is not heating or lighting - it is cold, its not cheap to produce.
If you are oven cooking above 180C then you will likely be safe leaving the sealed container to cool to room temperature, this is because you will kill virtually all bacteria capable of causing illness, even hotter is better.
Low temperature cooking, such as a slo-cooker is known to be an issue, especially with poultry. These things cook at lower temperatures for lengthy periods but it is not enough to kill off certain bugs, although it does prevent them breeding. If you then allow such food to cool at room temperature for several hours, those bugs will start to reproduce.
If you use a slo-cooker, then you should consume the food as soon as possible after the cooking cycle has completed, is isn’t really suitable for chilling down. Cook freeze might be a better option as long as you can get that temperature down - resumption of bacterial growth tends to restart from around 20 minutes after food has returned to below 40C - so ideally you’d get your food to the lower bacterial growth temperature - around 5C in some time less than this, but a couple of hours in a sealed container should be ok - just remember that your shelf life is not going to be the 3 months that you get on commercially frozen food.