Ultraviolet catastrophe is a divergence that appears when considering a thermodynamic equilibrium of electromagnetic radiation. In fact, in modern (quantum) language, black body radiation is simply viewed as a photon gas in thermodynamic equilibrium (no black body is needed).
So the electromagnetic radiation, resulting from the Maxwell equations is the very essence of the subject. Furthermore, the expressions for the energy density of the electromagnetic field, which diverges, also come from from the Maxwell equations (aka Poynting theorem). However, another essential component is statistical mechanics, since we are talking about thermodynamic equilibrium.
Related
How can blackbody radiation be explained by quantization? In my answer to this question I provide the parallel calculation for the energy density of the electric field from classical and quantum perspective.
Does thermal energy include the energy of thermal radiation as part of its definition? - here the answer provides full derivation of Planck's formula.