Consider two cavities at the same temperature. We'll suppose that the two cavities can be connected by a "door" that can be opened or closed to allow or to deny the passage of radiation between the cavities. We'll suppose that the walls of one cavity are bright and shiny with an absorptance close to zero, and the walls of the other cavity are dull and black with an absorptance close to unity. We'll also suppose that, because of the difference in nature of the walls of the two cavities, the radiation density in one is greater than in the other. Let us open the door for a moment. Radiation will flow in both directions, but there will be a net flow of radiation from the high-radiation-density cavity to the low-radiation-density cavity. As a consequence, the temperature of one cavity will rise and the temperature of the other will fall. The (now) hotter cavity can then be used as a source and the (now) colder cavity can be used as a sink in order to operate a heat engine which can then do external work, such work, for example, to be used for repeatedly opening and closing the door separating the two cavities. We have thus constructed a perpetual motion machine that can continue to do work without the expenditure of energy.
From this absurdity, we can conclude that, despite the difference in nature of the walls of the two cavities (which were initially at the same temperature), the radiation densities within the two cavities must be equal. We deduce the important principle that the radiation density inside an enclosure is determined solely by the temperature and is independent of the nature of the walls of the enclosure.