A restaurant might make a large pot of soup, or chili, spaghetti sauce, etc. Do they have to serve it all that day? If they can serve it another day does it have to be kept hot or should it be cooled, stored in the fridge and reheated?
Yes. There are protocols to safely cool down foods before storing. Same for home cooks.
The established guideline is:
The soup must cool from 140 degrees F to 70 degrees F in two hours and from 70 degrees F to 40 degrees F in no more than four hours.
(Cite: umpteen hits for “food safety restaurants hot soup” all in agreement with the above. )
… and assuming the restaurant closes overnight, it would be insane to leave an unattended pot bubbling for hours in a locked building.
Yes. Often. A lot of soups and sauces are prepped in some form well ahead of time, sometimes as a base with additional liquid and ingredients added when heating up for serving. Portioning of the prepped concoctions is done so as not to make too much of the final product at once so at the end of the night leftovers don’t have to be saved.
Meant to reply to the OP. In agreement with @chela.