  We show that the fine structure of the electron spectrum in cosmic rays,
especially the excess claimed by AMS-02 at energies $\sim$42 GeV, is fully
accounted for in terms of inverse Compton losses in the photon background
dominated by ultraviolet, infrared and CMB photons, plus the standard
synchrotron losses in the Galactic magnetic field. The transition to the
Klein-Nishina regime on the ultraviolet background causes the feature. Hence,
contrary to previous statements, observations do not require the overlap of
different components. We stress that the feature observed by AMS-02 at energies
$\sim$42 GeV is not related to the positron excess, which instead requires the
existence of positron sources, such as pulsars. Because energy losses are the
physical explanation of this feature, we indirectly confirm that the transport
of leptons in the Galaxy is loss-dominated down to energies of the order of
tens of GeV. This finding imposes strong constraints on the feasibility of
alternative theories of cosmic transport in which the grammage is accumulated
in cocoons concentrated around sources, requiring that electrons and positrons
become loss dominated only at very high energies.
