Do you have any sources for your claims? "Majority of depression cases treatable with lifestyle changes" and "poor solutions in the long term for many".
These are some of the reasons people quit taking them, which can result in all sorts of tragic consequences if they don't stop taking them under guidance of a medical professional. Along with people who quit taking them because they "feel better". Cutting off these medications often results in a relapse (similar for anxiety medications). EDIT: And a lifelong dependence on a medication is a difficult thing for many people to deal with. When missing even one or two doses of these medications can result in a massive emotional shift, this is a fragile solution.
CBT (which is much more than just the "lifestyle" changes, my wording was, again, not the greatest) offers better handling of emotions and reduced risk (or mitigated effects) of relapse. Largely by developing coping skills and other mental/emotional tools in these lines.
What also can work well is a combination of both. But a serious risk with medication only is masking of the underlying problems. The individual can feel good, or at least not depressed or anxious, but the stressors and causes are still present. So when going off the medication (self-decided or medically guided) and re-encountering those stressors, they lack the skillset to handle it any better than they did the first time (without some amount of either self-directed or therapy-aided development of coping skills).