It's the whole copyright question. Users own the copyright on their own posts, and it's the terms of service that are supposed to say what the server and other federated servers are allowed or not allowed to do with them. I don't even remember if there were terms of service when I joined Lemmy... But assuming there were, and they didn't explicitly say whether it or federated servers can use user content to train AI, then it becomes a legal question that can only be determined by courts.
Note that this determination will only apply in the country/state where that court is.
IANAL
Nobody does