For every one site that shut down, there are a dozen replacements.
Not legal.
There have been plenty of instances where you could get lifelong legal ownership of something very valuable only if you got it at a certain time, and that time often ends abruptly without warnings.
Or you can suppress the impulse and skip getting the book, then either forget the site altogether, or visit it five years later and find that it got shut down four years ago.