CBT is often oversold as a cure for every kind of mental health issues. New meta-research has found that the effectiveness of CBT has been decreasing for quite some time and long-term effectiveness of CBT is arguable.
Regarding effectiveness of AA, I think it makes sense. Lot of people with addiction suffer from childhood trauma, emtional neglect, and abandonment. In psychological term it is called attachment injury. A community where you are not shamed, validated, understood, and accepted would give corrective emotional experience, which would in turn heal your attachment trauma. I've heard this phrase somewhere: "what cures people in therapy is love". So it's not surprising that finding a community where you are accepted would help you treat your addiction.