Reddit shut their API access down only very recently, after the AI craze went off. Twitter did so right after Musk took over, way before Reddit, way before AI ever went nuts.
X shut down API access in Feb 2023, Reddit shut theirs down at the end of June of the same year. Just barely 6 months apart.
Furthermore, while X had also only announced this in February, Reddit announced their API shutdown just 2 months later in April.
And, to further add to that, X was pretty upfront that they think they have access to a large and powerful dataset in X and didn't want to give it out for free. Reddit used very similar wording when announcing their changes.