The principle we learn from this process is the Second Law of Thermodynamics, which states that heat flows from a body at higher temperature to a body at lower temperature.
This law implies that spontaneous processes naturally lead to an increase in entropy, or disorder, in a system. The heat transfer follows this principle, as energy naturally moves from hotter to cooler regions.