There is a general principle in classical statistical mechanics, called the equipartition theorem, that says that at thermal equilibrium the energy in each possible normal mode of a system of interacting degrees of freedom will be equal (and equal to kT, but that is not relevant here).
The number of normal modes in an object of mass M is equal to the number of degrees of freedom, which is 6 for each atom or molecule in it, a staggeringly huge number. Almost all of them are "microscopic" modes, meaning they consist of a handful of atoms or molecules wiggling one way or the other. They have very short wavelengths, and, consequently, can be expected to absorb and emit electromagnetic radiation at exceedingly small wavelengths, mostly in the UV.
If the equipartiation theorem is right -- and there are very general reasons for thinking it must be -- then almost all of the electromagnetic energy absorbed and radiated by a solid object should be in the UV, because that's where almost all of the normal modes of the object are. (In Planck's day the problem was even worse, because the idea that matter is made of atoms was even then not 100% accepted. If you don't have atoms to put a lower limit on how fine-grained the normal modes can be, then you end up with the absurd result that all the energy available always goes into infinitely high frequencies, or infinitely short wavelengths.)
Planck resolved the problem of why this is not what we seee, that in fact the bulk of electromagnetic energy absorbed or radiated by hot objects goes into LOW frequency and LONG wavelength modes, and the high frequency/short wavelength modes are mostly empty. He did this by requiring that electromagnetic energy be absorbed or emitted only in quanta with energy E = hv, where v = frequency. What this means is that equipartiation is not satisfied.
What happens is that, roughly speaking, entropy takes over. There are more ways of electromagnetic energy being distributed in the (fewer) long-wavelength modes, because the electromagnetic energy is broken up into smaller-energy chunks. If you want to put the electromagnetic energy into any of the short-wavelength modes, you must consolidate it into a small number of large-energy chunks, and there are far fewer ways to do that. Since isolated systems always maximize their entropy, you end up with the energy in long-wavelength modes.
Planck did not himself exactly believe his results -- he thought of the quantization as a mathematical trick only, and looked for years for some way to get rid of it, and return to a classical picture.

before planck's time itself, the scientists already figured out that higher frequency light would have more energy is it ? and since entropy takes over the energy goes into lower frequency waves which would have more states and lower energy

Yes, the principles of classical statistical mechanics had been well understood for 25 years at the time Planck did his work, much of it set forth in exquisite careful detail by the American physicist Josiah W. Gibbs, after whom the Gibbs free energy is named, in the 1870s. Interestingly, however, there were signs in classical stat mech of problems that could only be solved by -- and pointed to -- quantum mechanics, including Gibbs Paradox, Maxwell's Demon, and the quantum of action needed in classical stat mech formulas.