Why are electric shavers specifically permitted under FAR §91.21
This is an educated guess, based on history:

Electric razors were once well known as prone to generating elctromagnetic interference -- the ones available in the 1940s could pretty well blanket a nearby AM broadcast radio receiver.

However, in similar time frames, it was very important for oxygen masks to fit closely on the face, and beard stubble, besides being reportedly very uncomfortable, would compromise the seal (either increasing consumption from the limited store of oxygen available for high altitude flight, or risking hypoxia for the wearer).  Therefore, on long flights, it wasn't at all uncommon for aircrew to shave one or more times before getting where they were going.

As noted in comments, shaving with a blade razor (even the safety razors available when this regulation has its roots) was a bit hazardous in an airplane that might, without any warning, encounter turbulence that could literally knock someone out of their seat if not belted in place.  Wind-up rotary razors existed before 1950, but they were rare, relatively delicate, and expensive.  Electric razors that ran on 115 V were available before 1940 and, with care, would do a good enough job to let an oxygen mask seal well (rechargeable types didn't appear until the late 1950s).

The regulation, then, is to recognize that even with the potential radio interference, an electric razor was specifically to be permitted during flight.