A conservation law comes from the data. The mathematics of QED may allow a lot of unphysical situations, but it is observations that establish conservation laws, and the standard model of particle physics incorporates them and picks that subset of solutions of the various incorporated mathematical models that obey the conservation laws.
In developing the standard model for particles, certain types of interactions and decays are observed to be common and others seem to be forbidden. The study of interactions has led to a number of conservation laws which govern them. These conservation laws are in addition to the classical conservation laws such as conservation of energy, charge, etc., which still apply in the realm of particle interactions. Strong overall conservation laws are the conservation of baryon number and the conservation of lepton number. Specific quantum numbers have been assigned to the different fundamental particles, and other conservation laws are associated with those quantum numbers.
Thus, it is the data that imposed lepton number conservation in the standard model.
Extensions of the standard model that include the neutrino masses do allow lepton number violation. Have a look at this answer