Boiled milk is kept to cool down to room temperature before it is refrigerated in homes, cooling down of this milk is the establishment of thermal equilibrium between milk and air in the room.
Hot water/beverages cool down and ice cream melts due to the same reason.