Why do some electrical devices have polarized plugs and others do not?

Well?

Generally, if it is important for safety that the hot and neutral be in one arrangement rather than the other, then a polarized plug is used. One example of this is in a lamp. Since unscrewing a bulb to replace it necessarily exposes one of the electrical connections, it is best that this connection be the neutral. The only way to guarantee this is to have a polarized plug–of course it’s a guarantee only if the electricians that wired your house did their jobs right. Other things are equally safe (or equally dangerous) no matter which way the hot and neutral are arranged. These can be made with a nonpolarized plug, though either kind may be used.

AND the device must be wired properly. A GREAT example is a toaster. If it’s wired backwards, then even when it’s off the heating elements are still live and reaching in to grab your toast could result in a shock. In general, (IANAElectrician) the neutral and ground should never be on a switch.

Not so much anymore. Most toasters (certainly all the ones with the UL symbol) are made with a double pole switch which cuts out both the hot AND the neutral. Even this isn’t entirely foolproof, as I have seen cheap switch contacts fuse closed under fault conditions.

A few electronics devices only work properly if the hot & neutral are connected properly. So they would need to have polarized plugs.

Other devices have polarized plugs to improve chances for safety, as QED said. (But unscrewing a light bulb exposes both both lines – one in the threads, the other in the bottom button. It’s safer if the hot line is only available in that small button at the bottom of the connector. This protects people who are so dumb they stick their whole thumb into the socket.)

Finally, some devices may have polarized plugs just for economic reasons. A manufacturer buys large quantitites of plugs, and it might be cheaper to just keep 1 kind (polarized) in stock at the factory.
So there’s no particular pattern to this. Of the many lamps in my house, at least half have normal, non-polarized plugs. Including some new ones.

Devices with transformers at their input don’t need polarized plugs. Those plug-in, low voltage power supplies nearly always have non-polarized, 2 prong connections. I assume that’s so that you can connect them either way depending on how much room there is at the outlet.

I believe that either 2 0r 3 prong polarized plugs are now standard for all other devices although not required in many locales.

Polarized plugs are good. I have a 1964 Fender guitar amp that will give you a pretty good jolt through the guitar strings (which are connected to the case of the amp) if you get the non-polarized plug backwards.

Related question:

Heavy duty power tools (mitre saws, reciprocating saws, etc) that are ‘double insulated’ do not have the third ground wire/plug.

Why?

As an example, I have a cheapo plastic fan with a polarized plug, while the plug on the charger for my MP3 player is a straight plug.

This indicates a lot of “leakage,” *i.e.**a relatively low resistance connection of the “hot” lead to the case and isn’t the way the thing was designed. In other words, something is wrong and I would have it fixed.

The importance of polarized plugs and proper polarization of the entire circuit becomes readily apparent to Americans living overseas. Or at least those Americans who are using 110v appliances plugged into autotransformers. At one embassy they fried thousands of dollars worth of mother boards prior to my arrival.

If you’re talking AC applicances, then the functionality of the device shouldn’t be affected if all parts of the circuit are isolated from earth (US: ground). Any distinction between live and neutral is mainly for safety reasons, e.g. only the live line will be fused. Occasionally there’ll be a mains applicance that needs an earth reference, and one such example of this is flame-sensing gas ignitors. The ignition electrode is biased with current-limited mains voltage, and the flame is sensed by the electrical model it presents* between the electrode and ground. As neutral is at roughly earth potential anyway, the circuit here needs to be cunningly designed so it will work with live and neutral swapped.

Even low voltage AC plugs benefit from polarisation. There’s a range of music effects pedals that use AC output mains adaptors, and if you’re running a number of these from the same mains adaptor then they all need to be oriented the same way or the ground interconnects will crowbar the power supply.

*An electrical model of a flame looks a bit like a perfect diode in series with a huge resistor of about 100Mohm or so.

The ground wire is connected to the normally non-energized metal parts of a tool. It is designed to provide a positive path to complete a circuit if the innards of the tool get wonky and a live wire touches the normally non-energized parts. It protects you by the short circuit being directed in to the electric system rather than through your arm. But this method is not foolproof, as if the short happens while you are holding the tool, it generally takes less time to give you a good shock than it does to blow your breaker.

Most old metal tools have the wires floating around in direct contact with metal, and all it takes for a short is for the insulation to crack or rub off. The double insulated tools add more protection between the live wires and any metal parts. The idea is that rather than attempting to direct away the current if you get a short to the metal, they make it almost impossible to make that short in the first place.