I'm new to QM and have some confusions about QM. It seems to be that the quantization of energy is just some result from solving the equation, like the infinite square well problem, the quantum harmonic oscillator. I wonder if there are some fundamental reasons why we get such weird results
Before the maths there were observations that showed that somehow certain physical quantities where quantised (e.g. the Stern-Gerlach experiment). These phenomena have then got an explanation in terms of the mathematical models of QM. The fundamental reasons lie then within the mathematical frameworks.
In more concrete terms, a physical system is sometimes represented by an algebraic structure known as a C*-algebra. Depending on its properties, the spectrum of the observables (the elements of the self-adjoint part of the C*-algebra) can be quantised or continuous (or a combination of both).