As someone who was diagnosed with MDD, it's not something that will magically fix you. But it's something that will (should) improve your base mood. My floor was higher when I started to exercise.
It also gave me something to focus on.
I feel like it's the same thing as saying exercise doesn't cure obesity. It won't fix it if there are no other diet and lifestyle changes but it helps and is a vector in the right direction.