While exercise is very beneficial for health, it can't cure a specific medical condition. If someone has cancer, they can spend as much time in the gym as they want but it's not likely to help. Cancer requires medical treatment and medicines / drugs. The same is true for many other illnesses.
Nothing irritates my soul more than when people suffer from diseases or a mental illness and people suggest to work out more and to maintain a healthy diet. Unfortunately exercise does not fix every single problem out there and people need to stop being so ignorant and thinking that it does.