Tbf, AI companies were getting Reddit's content no matter what. Might as well make $50M and keep their web scrapers from overloading Reddit's servers.
Reddit has been pushing hard into the advertising space recently. The redesign, API lockdown, old reddit shutdown, sign-in requirements, etc... All revolve around increasing traffic to the official site/app where ads are shown and improving user tracking so that they can increase ad clicks and charge a higher CPM for ad campaigns. I'm sure AI and scraping were part of the reasoning, especially for the API lockdown, but by and large all signs point towards ad revenue being the leading motivation.
API sales are peanuts compared to ad revenue and when they announced the sign-in requirement, they specifically said targeted ads were a major reason.