Part of that may be attributed to the endorphin effect of exercise. We feel that the sense of purpose and accomplishment that comes with regular exercise also helps. Sometimes action has to come before motivation, and depressed folks need to act to prime their motivational engine.
Yoga, in fact, is specifically associated with decreased depressive symptoms and increased mood—perhaps partly because of the deep breathing that's done during the practice. In a similar way, spirituality is also associated with less depression.