Open Library allows you to digitally borrow a ton of books for free. It's not the greatest experience since the books they own are scanned and not digital copies, but it's good enough, and their catalogue is not half bad.
Just legality. These are paid books that they can't give away for free, but acting as a library they can let you borrow them, read them, and "return" them.
In practice you'll rarely feel this system because you can just re-borrow it whenever you want to read it.
The legality was only ever a grey area. Their days may be numbered, however. During the lockdowns they removed the one physical copy per digital copy lent, and as a result of that they got sued. Instead of settling out of court they drummed up donations to a legal fund and lost hard, and during the trial a judge ruled that their practice was illegal. In my opinion, they should have done everything they could have to settle out of court, rather than try and build a frivilous defense that had no grounding in law.
Right now, they're appealing it, so I guess that's why it's still up. However it looks like their strategy isn't any better now than it was then.