Thanks for reading and responding!
I see where you are coming from. But, these are just examples. They are not meant to be able to handle every use case.
My POV is that frontends are mostly light data-wise and we seldom hold a large amount of data at a single time in frontends. The data held in a frontend app at a time uses only a fraction of memory the DOM uses. So, whenever you sort in the frontend, it will most likely be only a little bit of data, and memoizing will not make a noticeable difference.
Also, that hook is just an example. But it would still be convenient if you are doing a lot of sorting in the frontend and need to quickly reuse the same sorting logic.
If there was no useMemo inside that useSorted then it would be just like writing a sortCopy() function which returns a copy instead of sorting in place, which is perfectly usable inside a component. But, I just wanted to demonstrate that you can combine hooks that come with react to create your own hook for your own application's use case.
I will add something along those lines to the article. Thank you for your input :D