Spammers killed many a forum because it became a full time effort by admins and moderators to remove them. Automated tools, especially early tools, had limited effectiveness. People running a site as a hobby don't want to spend their days removing spam comments.
Assholes also (for many reasons) will DDoS forums. This is another administrative headache for site owners if not a financial headache.
The same driving force saw blogs remove comments for centralized solutions like discus or abandon self-hosted blogs for Medium and the like.
While Facebook and reddit have plenty of spam issues the "owners" and mods of a group/subreddit are different from the site admins. There's a lot less financial risk for someone running a group there than their own server. They also let a wider swath of people run a group rather than only those that are interested in a niche topic, have the technical skills to effectively run a forums, and the money to pay for it all.
We lost the “local” based internet groups and we only really have “subject” based groupings anymore.