The problem is with cheap chargers that are not isolated. One or the other pole of the charger has a straight through connection to the wires in the outlet. That is to say, one of the wires on the low voltage side is connected straight to the pins in the outlet.
If you use a non-isolated charger and that straight through connection is connected to the live wire in the outlet, then you can get a shock by touching that wire of the charger. If you are really unlucky, the hot wire will be connected to the metal housing of the phone.
If you are in a wet or really humid place, that hot wire can give you a fatal shock.
The real problem comes from cheap chargers (and counterfeit chargers) rather than chargers from good manufacturers. A real Apple charger will be properly made - it would have to be severely (and obviously) damaged to be hazardous. A fake Apple charger might be sold at (or near) the same price, but may be improperly built - it is a hazard when new.
The same goes for other manufacturers. The cheap chargers you can buy in low price junk stores can be dangerous. The brand name chargers you buy in better stores will usually be properly made.
The warnings tell you to be careful with all chargers because it's tough to teach people how to tell cheap, dangerous junk from good quality equipment.
Even a good quality charger can give you a fatal shock if it is plugged in and you drop it in the water while you are in the tub.