A federal judge ruled that Meta did not violate the law when it trained its AI models on 13 authors' books.