Some electrical interfaces, such as ethernet, specify that the outward-facing socket are to be isolated by a transformer. For instance, see this circuit example from the data sheet of an ethernet controller:
Ostensibly, these transformers are there to "protect" the circuit from external high-voltage transients, such as lightning strikes. I couldn't imagine how transformers might help, so I simulated it, using this circuit (SW4 closes at 200 ms, "starting" the lightning strike and SW6 closes 50 ms later, ending the strike):
As you can see, the surge is let right through, and the transformer doesn't help at all! So what am I missing? How can a transformer protect against high voltage surges from the outside?