Actually, many seemingly "harmless" electrical devices out there which are meant to be in direct contact with the user's skin (and especially for extended amounts of time) are completely unsafe as soon as you use them while powered by mains adapters. Even if that sounds excessive, I guess that we could somehow consider that such devices should comply to safety rules close to the ones used for medical devices. Earbuds being close to the brain and some probably with lowish contact impedance (if they are conductive) due to ear canal sweating, you have a recipe for something potentially interesting.
Obviously in the case of using a device as in the earbuds example, powered by its charger connected to mains, that can be almost equivalent to plugging the charger's output itself directly into your ear canals in case there is a fault with the charger and insufficient insulation with the rest of the device. Many cheap chargers/mains adapters are complete crap, and some earbuds are actually slightly conductive. Problem is, a lot of them aren't actually properly tested before being put on the market.
A few decent manufacturers have taken steps to drastically limit the risk (for instance by making it impossible to use earbuds and a charger at the same time), but a lot haven't. And stating in the manual that it could be hazardous... well. How many people actually read manuals?