E(t) does not measure energy, energy per mass unit.
Starting with an ODE coming directly from Newton's 2nd law F=ma with a spring force F=−ku and ma=mu″ (a: acceleration, u: displacement), we have
mu″+ku=0 Integrating this equation gives a physical energy balance:
E(t)=12mv2⏟kinetic energy+12ku2⏟potential energy=E(0),v=u′ Note: the balance is not valid if we add other terms to the ODE.