Every site with user-generated content has an army of employees of various sorts, trying to make sure it doesn't descend into a morass. The natural un-moderated state of any community site is complete and total garbage.
Except on StackOverflow all of those are unpaid voluntary community moderators. There are less than ten people being paid by SO in community facing positions as far as I know. Also, they recently fired two of their most long-standing community managers.
But StackOverflow (the company) is more than just public Q&A, and in fact public Q&A is not primarily how they make their money. Job ads and SO for teams seem to be the main revenue sources.
Well "trash" is a matter of opinion, but profitability isn't. If a community is left unmoderated, it gets so toxic and extreme that advertisers won't go near it with a 10 foot pole.