In that sense, it's not illegal, any more than the ability to move all messages from the long-lasting storage (SSD) to the main memory (RAM). Or the ability of the screen to "see" all that is being displayed.
It's simply a dumb algorithm running on the local metal, that's not that far from a sorting algorithm on the same metal.
Yes. the dumb algorithm is built by training a model on a wast amount of data. But after that training, it becomes a static model that just sorts 4-letter-long chunks of letters based on a probability matrix.