Well, let's look at Calyrex. It was once a merciful king of Galar and is highly intelligent. With it being a king, it probably would have been required to learn the human language in order to communicate with its subjects, albeit by possessing a human. So now that I have covered Why Calyrex can/needed to talk. Now, in other games, the most recent Legendary Pokémon to talk was Tapu Koko via the player's Z-Ring. So, one can reasonably assume that the other Tapu's can also talk to people via their Z-Rings if needed. With other Legendaries like Zacian and Zamazenta, Calyrex is more human looking, which may be a reason, but many Legendaries have rarely been in contact with Humans. This may also explain it because they never got the chance to learn to speak/can't speak at all. However, above all of this is Game Freak didn't want other Legendaries to speak.
So, it is probably a combination of the Legend's backstory and origin as well as the fact that most Legendaries rarely have human contact. Though take into consideration that only Game Freak knows why.
Hope this helps!