It's effective just like taking a hammer to your computer is when there is a bug in your code. You can't have a bug if you don't have a working computer.
One of more credible theories about depression is that it occurs when the brain gets stuck in a "bad" state or cycle (like a local minimum or attracting state). If this model is correct, a treatment that nudges brain activity away from the depressed state and towards a less pathological one would help.
It's more akin to rebooting the computer than smashing it, if you will.
I ask because ECT seems to upregulate trophic factors, rather than downregulating them. Some sort of hippocampal injury does seem like it could explain memory-related side effects, but it apparently doesn't actually happen (e.g., https://jamanetwork.com/journals/jamapsychiatry/fullarticle/...)
That’s an unreviewed letter to the editor, not an actual research report.
Look, I’m not arguing that ECT is the best thing ever. The side effects are awful for some people, no one understands the mechanism, and so on. However, it sometimes works when other treatments—-which aren’t great either—-fail. Clearly, better therapies are needed all around.