I let things cool before I put them away, because I don't want the cold things already inside to get warm. After they cool, they do get put in the fridge, or freezer straight away.
I'm always leery of potlucks, where food has been sitting out. I don't know how long it was on the cook's counter, or in the car before it got to the buffet table.