It’s essentially legal, and I think it’s not that scammy honestly. People want these books on paper, nobody prints them anymore or has the texts.
edit: I also saw some people selling the OCR from these books, which is far worse. You need to guess the original, especially if it has some latin/german inside English.