It's one of the amazing thing about thermal physics, there are a lot of situations where the behavior you see is just the most likely given the energy constraints-- the details don't matter. You can think of it as a kind of general case of the central limit theorem, wherein you can expect a certain type of distribution (in that case, Gaussian instead of Planckian) simply because it is the one that happens in the most ways, so it is the most likely-- regardless of the details of the system that is creating it. So just like if I looked at the height of a random collection of people at a given age, I expect a Gaussian distribution even if I know nothing of the physics of growing or the biology of DNA, similarly you can expect a Planckian radiation field coming from a "blackbody" (a system that interacts strongly with light) at a given temperature, regardless of the details of what the system is made of or how it actually does interact with light.