Relativity is derived from Maxwell's equations, which yield a constant speed of light - a counterintuitive conclusion.
Likewise, which equations and their counterintuitive results yield QM?
I am not asking about QM itself but Max Planck's conclusion in the 1890's that light is quantized.
Can ultraviolet catastrophe be derived or just observed?
I'd prefer a theoretical way to get that just like with speed of light constancy from EM.
I feel electromagnetism has played a similar role in QM just like relativity in terms of those unexpected results.