This is done since we believe c to be a true constant of nature. Which determines that mass and energy are equivalent. To calculate EM radiation speed he mustve had a reference point from which to measure distance time and speed.
Article A New View of Light Prior to Einsteins breakthrough scientists sought the luminiferous ether through which they believed light must travel.
But to keep the speed of light constant at all times and for all observers in special relativity space and time become stretchy and variable. The motion-energy K green of an object is its total energy E blue minus its mass-energy m c-squared black. He did not prove it with mathematics anywhere that would be impossible. Time is not absolute for example.