Or pasta. You don't bring the water to a boil and then immediately drain.
Or rice, similar to pasta.
Or some tougher leafy greens. Collard greens need to be simmered ~30-60 minutes.
Or caramelized onions. You are doing chemical reactions (browning sugar, etc.) that take time.
There is a gradient of temperature from the surface to the inside of the food. Depending on the composition, it will take more or less time for the thermal energy to propagate.
In addition, cooking involves chemical reactions. Now, I’m not a biochemist, but if I had to guess, most cooking chemical reactions are probably endothermic (short of setting your food on fire), in which case the chemical reaction comes f cooking will remove thermal energy from your cooking medium (e.g. water or oil) and your cooking medium will cool down even if you had perfect insulation.
But temperature for boiled things is still important - see candy for example. The temperature directly indicates the amount of water left in the mixture.
All that said, resting is a distinct step from heating that is often required for a food to end up as you expect it to. IWO, yeah, food isn't always ready to eat after heating.