I suppose such a situation might arise where a panel was behind a pizza oven .... but that's not on my list of situations I've actually seen.

#1 was in a hot dog factory, where the panel controlled the sundry motors that moved the sausages through the 'oven' ... a 100 ft long tunnel with conveyor drives, steam injectors, smoke generators, water chillers, etc.

#2 was in a factory that made plastic boxes, and the heat was from the forming process .... it takes quite a while for plastic to cool. The panel was heated by finished product, as it was transported past the panel.

#3 was a place that made diving boards for the Olympics. There, the panel in question was between the powdercoat oven and the anodizing tank ... if they both were operating, there was a lot of heat in that corner.

#4 was the motor controllers at the top of a tower in a dog food factory. While the equipment was on the roof, between the summer sun and the heat from the tower (metal hard hats were needed, as plastic ones got soft) ... the motor starter heaters were already the largest made for that size of starter.

Another variation is when a fan is directed at a single-phase motor that has internal overload protection.