Food hygiene standards usually limit the time that a food is in the ‘danger zone’ for bacterial growth - so it probably makes sense in terms of power usage to leave the food out to cool from boiling, until it dips into the danger zone (and maybe a while longer), then cool the rest of the way in the fridge