If a server does something awful like encouraging spam or allowing abuse or whatever, admins of other servers can block it, which is also known as “defederation”. The worse a server behaves, the more servers will block it, and the very worst-behaved servers will find themselves almost completely isolated from the rest of the network.
A real world example: in 2019 a notorious far right community attempted to join the Fediverse, but so many other servers pre-emptively blocked them that the group gave up and abandoned its plans to federate. There was even one third party app which rickrolled anyone who attempted to use it to log onto the far right server.