Einstein initially did write:
If a body gives off the energy L in the form of radiation, its mass diminishes by L/c^2
Does the inertia of a body depend upon its energy-content?, 1905
which got re-arranged to E=mc^2. Although he was aware that this doesn’t apply to systems in motion or mass-less particles such as photons.