It is not true that “energy (E) is equal to mass (m)”. What is true is that the mass (m) of a system is equal to the special case of the time component of its 4-momentum in the “rest” frame (where the net spatial component of momentum is zero), and that the units we typically use to measure the time component as “energy” (E) are chosen in such a way that the extra “kinetic” energy as seen by a moving observer is given approximately by (1/2)mv^2 rather than (1/2)m(v/c)^2 with units of space and time chosen in such a way that the limiting speed c is very large (and so that speeds we actually experience do not have to be associated with very tiny numbers).