Why is it important for mains power supplies to be isolated?
Because the mains supply is very unpredictable, and can do all sorts of things outside its nominal specification, which might damage components or at least break the nominal design assumptions. A non-isolated design also has all its voltages referenced to one of the mains conductors, which might or might not have a useful/safe relationship to other potentials in your environment (like earth/ground, for example).
If the only stuff on the low-voltage side is inaccessible electronics, then non-isolated supplies are fine - they tend to much be cheaper/simpler than isolated supplies, and lots of household equipment uses them. Even things like televisions used to work like this, if you go right back to before the time when they had external video/audio connections. The antenna connection was the only external socket, and that was capacitor-isolated.
If a human being or 3rd party piece of equipment needs to interconnect with the low-voltage side of your design, then an isolated supply both gives you a clear barrier across which dangerous voltages won't pass, even in the case of component failure, and it means your circuit is now 'floating' relative to the mains. In turn, that means you can arrange for all the electronics to operate near ground potential, with all your interconnected equipment having at least roughly the same voltage reference to work from.
Short answer (oooh, this is a pun, wait for it...): safety. What would the effect of a short from 240V or higher to... well, anything, be? Low voltage devices? Dead! House? On fire! Lawsuit? Pending! Isolation at least makes a direct short to wall voltage impossible and an indirect short less dangerous and less likely. For instance, if the wall voltage totally fries everything on one side of the transformer you have a non-working transformer. A non-working transformer means no coupling and no voltage on the other side, so no damage. Plus there are more protection options for the lower voltage side (less expensive protection options anyhow).
I can think of a few:
- Helps isolate the outputs from dangerous line-level events (lightning strikes, surges, etc.) since most transformers are step-down in commercial power supplies
- Allows you to use the chassis of the equipment as a safety shield, by earthing it (any conduction from the mains to the chassis will instigate a fuse blow or breaker trip, rapidly disconnecting the fault)
- Ensures that sufficient margin exists in the design to prevent arc-over from primary to secondary even under less-than-clean environments (toner dust is a particularily nasty gap-bridger)
- Reduces the 'stiffness' of the power source - a small transformer will saturate out much more quickly than the mains, which also has the effect of driving the primary current higher and activating some sort of safety device (fuse, breaker, etc.)
- Regulatory organizations require it in most applications: IEC 60950, CSA C22.2, etc.