Or did you think that magically goes away because it's centralized?
GS instances have ways to block content instance-wide. So spam and porn filters can catch items and prevent all users on the instance from seeing it.
I don't know if ActivityPub specifies things like that in the spec yet, but moderation is of course a huge factor in the success of the fediverse. Lots of work is devoted to it.
Incredibly, nobody needs to be censored. The offending poster can be reported to authorities and handled from there without ever having to tell a user what they can and cannot post.